mirror of
https://github.com/jellyfin/jellyfin-plugin-anidb.git
synced 2024-11-27 08:00:25 +00:00
Merge pull request #10 from h1dden-da3m0n/update/ci
This commit is contained in:
commit
e8c78ddf26
19
.github/dependabot.yml
vendored
19
.github/dependabot.yml
vendored
@ -4,21 +4,26 @@ updates:
|
|||||||
- package-ecosystem: nuget
|
- package-ecosystem: nuget
|
||||||
directory: /
|
directory: /
|
||||||
schedule:
|
schedule:
|
||||||
interval: daily
|
interval: weekly
|
||||||
time: '00:00'
|
|
||||||
open-pull-requests-limit: 10
|
open-pull-requests-limit: 10
|
||||||
|
labels:
|
||||||
|
- chore
|
||||||
|
- dependency
|
||||||
|
- nuget
|
||||||
commit-message:
|
commit-message:
|
||||||
prefix: fix
|
prefix: chore
|
||||||
prefix-development: chore
|
|
||||||
include: scope
|
include: scope
|
||||||
|
|
||||||
# Fetch and update latest `github-actions` pkgs
|
# Fetch and update latest `github-actions` pkgs
|
||||||
- package-ecosystem: github-actions
|
- package-ecosystem: github-actions
|
||||||
directory: /
|
directory: /
|
||||||
schedule:
|
schedule:
|
||||||
interval: weekly
|
interval: monthly
|
||||||
time: '00:00'
|
|
||||||
open-pull-requests-limit: 10
|
open-pull-requests-limit: 10
|
||||||
|
labels:
|
||||||
|
- ci
|
||||||
|
- dependency
|
||||||
|
- github_actions
|
||||||
commit-message:
|
commit-message:
|
||||||
prefix: chore
|
prefix: ci
|
||||||
include: scope
|
include: scope
|
||||||
|
19
.github/workflows/build-dotnet.yml
vendored
19
.github/workflows/build-dotnet.yml
vendored
@ -1,4 +1,4 @@
|
|||||||
name: Test Build Plugin
|
name: Build Plugin
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@ -21,11 +21,14 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
dotnet-version: 5.0.x
|
dotnet-version: 5.0.x
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Build Jellyfin Plugin
|
||||||
run: dotnet restore
|
uses: oddstr13/jellyfin-plugin-repository-manager@v0.4.2
|
||||||
|
id: jprm
|
||||||
|
|
||||||
- name: Build
|
- name: Upload Artifact
|
||||||
run: dotnet build --configuration Release --no-restore
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
- name: Test
|
name: build-artifact
|
||||||
run: dotnet test --no-restore --verbosity normal
|
retention-days: 30
|
||||||
|
if-no-files-found: error
|
||||||
|
path: ${{ steps.jprm.outputs.artifact }}
|
||||||
|
21
.github/workflows/create-github-release.yml
vendored
21
.github/workflows/create-github-release.yml
vendored
@ -1,21 +0,0 @@
|
|||||||
name: Publish Drafted GitHub Release
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
tags: [ 'v*' ]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
publish_release_draft:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: github.repository == 'jellyfin/jellyfin-plugin-anidb'
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Get version from GITHUB_REF
|
|
||||||
id: get-version
|
|
||||||
run: echo "::set-output name=version::${GITHUB_REF/refs\/tags\//}"
|
|
||||||
|
|
||||||
- name: Publish release on GitHub
|
|
||||||
uses: test-room-7/action-publish-release-drafts@v0
|
|
||||||
with:
|
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
tag-name: ${{ steps.get-version.outputs.version }}
|
|
16
.github/workflows/label-sync.yml
vendored
Normal file
16
.github/workflows/label-sync.yml
vendored
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
name: Sync labels
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: '0 0 1 * *'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
labels:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: EndBug/label-sync@v2
|
||||||
|
with:
|
||||||
|
config-file: https://raw.githubusercontent.com/jellyfin/jellyfin-meta-plugins/master/.github/plugin-repo-labels.yaml
|
||||||
|
delete-other-labels: true
|
||||||
|
token: ${{ secrets.JF_BOT_TOKEN }}
|
31
.github/workflows/test-dotnet.yml
vendored
Normal file
31
.github/workflows/test-dotnet.yml
vendored
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
name: Test Plugin
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ master ]
|
||||||
|
paths-ignore:
|
||||||
|
- '**/*.md'
|
||||||
|
pull_request:
|
||||||
|
branches: [ master ]
|
||||||
|
paths-ignore:
|
||||||
|
- '**/*.md'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Setup .NET Core
|
||||||
|
uses: actions/setup-dotnet@v1
|
||||||
|
with:
|
||||||
|
dotnet-version: 5.0.x
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: dotnet restore
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: dotnet build --configuration Release --no-restore
|
||||||
|
|
||||||
|
- name: Test
|
||||||
|
run: dotnet test --no-restore --verbosity normal
|
57
.github/workflows/update-release-draft.yml
vendored
57
.github/workflows/update-release-draft.yml
vendored
@ -5,6 +5,7 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
update_release_draft:
|
update_release_draft:
|
||||||
@ -13,6 +14,58 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
# Drafts your next Release notes as Pull Requests are merged into "master"
|
# Drafts your next Release notes as Pull Requests are merged into "master"
|
||||||
- uses: release-drafter/release-drafter@v5.15.0
|
- name: Update Draft
|
||||||
|
uses: release-drafter/release-drafter@v5.15.0
|
||||||
|
id: draft
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.JF_BOT_TOKEN }}
|
||||||
|
|
||||||
|
- name: Setup YQ
|
||||||
|
uses: chrisdickinson/setup-yq@latest
|
||||||
|
with:
|
||||||
|
yq-version: v4.9.6
|
||||||
|
|
||||||
|
- name: Parse changelog
|
||||||
|
run: |
|
||||||
|
TAG="${{ steps.draft.outputs.tag_name }}"
|
||||||
|
echo "VERSION=${TAG#v}" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
cat << EOF | grep -P '^([*-] |###)' > cl.md
|
||||||
|
${{ steps.draft.outputs.body }}
|
||||||
|
EOF
|
||||||
|
|
||||||
|
sed -i -r 's/^(#+) (:.*:)? *(.*)$/\n\1 \3 \1/' cl.md
|
||||||
|
sed -i -r 's/^\*/-/' cl.md
|
||||||
|
|
||||||
|
echo "CHANGELOG<<EOF" >> $GITHUB_ENV
|
||||||
|
cat cl.md >> $GITHUB_ENV
|
||||||
|
echo "EOF" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
rm cl.md
|
||||||
|
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Update build.yaml
|
||||||
|
run: |
|
||||||
|
yq eval '.version = env(VERSION) | .changelog = strenv(CHANGELOG) | .changelog style="literal"' -i build.yaml
|
||||||
|
|
||||||
|
- name: Commit Changes
|
||||||
|
run: |
|
||||||
|
git config user.name "jellyfin-bot"
|
||||||
|
git config user.email "team@jellyfin.org"
|
||||||
|
git checkout -b prepare-${{ env.VERSION }}
|
||||||
|
git commit -am "Bump version to ${{ env.VERSION }}"
|
||||||
|
git push -f origin prepare-${{ env.VERSION }}
|
||||||
|
|
||||||
|
- name: Create or Update PR
|
||||||
|
uses: k3rnels-actions/pr-update@v1
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.JF_BOT_TOKEN }}
|
||||||
|
pr_title: Prepare for release ${{ steps.draft.outputs.tag_name }}
|
||||||
|
pr_source: prepare-${{ env.VERSION }}
|
||||||
|
pr_labels: 'release-prep,skip-changelog'
|
||||||
|
pr_body: |
|
||||||
|
:robot: This is a generated PR to update version and changelog in `build.yaml`.
|
||||||
|
---
|
||||||
|
${{ env.CHANGELOG }}
|
||||||
|
Loading…
Reference in New Issue
Block a user