From 0a55ac9efde804377339e85aa7b2b92d37d06de0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Odd=20Str=C3=A5b=C3=B8?= Date: Wed, 10 Mar 2021 22:58:28 +0100 Subject: [PATCH 1/4] Add dependabot config Co-authored-by: h1dden-da3m0n <33120068+h1dden-da3m0n@users.noreply.github.com> --- .github/dependabot.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..2f6ee06 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,24 @@ +version: 2 +updates: + # Fetch and update latest `nuget` pkgs + - package-ecosystem: nuget + directory: / + schedule: + interval: daily + time: '00:00' + open-pull-requests-limit: 10 + commit-message: + prefix: fix + prefix-development: chore + include: scope + + # Fetch and update latest `github-actions` pkgs + - package-ecosystem: github-actions + directory: / + schedule: + interval: weekly + time: '00:00' + open-pull-requests-limit: 10 + commit-message: + prefix: chore + include: scope From 9678161dc1742e5dbbbf4750a35b7a7d3824ba34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Odd=20Str=C3=A5b=C3=B8?= Date: Wed, 10 Mar 2021 23:02:36 +0100 Subject: [PATCH 2/4] Add CodeQL workflow Co-authored-by: h1dden-da3m0n <33120068+h1dden-da3m0n@users.noreply.github.com> --- .github/workflows/codeql-analysis.yml | 44 +++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/codeql-analysis.yml diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml new file mode 100644 index 0000000..f6acd22 --- /dev/null +++ b/.github/workflows/codeql-analysis.yml @@ -0,0 +1,44 @@ +name: Run CodeQL + +on: + push: + branches: [ master ] + paths-ignore: + - '**/*.md' + pull_request: + branches: [ master ] + paths-ignore: + - '**/*.md' + schedule: + - cron: '24 2 * * 4' + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + language: [ 'csharp' ] + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Setup .NET Core + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 5.0.x + + - name: Initialize CodeQL + uses: github/codeql-action/init@v1 + with: + languages: ${{ matrix.language }} + queries: +security-and-quality + + - name: Autobuild + uses: github/codeql-action/autobuild@v1 + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v1 From 9d101ef0a95165da68bdb30513bf3ed68b855e2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Odd=20Str=C3=A5b=C3=B8?= Date: Wed, 10 Mar 2021 23:03:46 +0100 Subject: [PATCH 3/4] Add test build workflow Co-authored-by: h1dden-da3m0n <33120068+h1dden-da3m0n@users.noreply.github.com> --- .github/workflows/build-dotnet.yml | 31 ++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/build-dotnet.yml diff --git a/.github/workflows/build-dotnet.yml b/.github/workflows/build-dotnet.yml new file mode 100644 index 0000000..b72083c --- /dev/null +++ b/.github/workflows/build-dotnet.yml @@ -0,0 +1,31 @@ +name: Test Build 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 + + - name: Test + run: dotnet test --no-restore --verbosity normal From 4a3196a46557167df2c3ab6a3f980c439b627eb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Odd=20Str=C3=A5b=C3=B8?= Date: Wed, 10 Mar 2021 23:05:13 +0100 Subject: [PATCH 4/4] Add release drafter Co-authored-by: h1dden-da3m0n <33120068+h1dden-da3m0n@users.noreply.github.com> --- .github/release-drafter.yml | 9 +++++++++ .github/workflows/create-github-release.yml | 19 +++++++++++++++++++ .github/workflows/update-release-draft.yml | 16 ++++++++++++++++ 3 files changed, 44 insertions(+) create mode 100644 .github/release-drafter.yml create mode 100644 .github/workflows/create-github-release.yml create mode 100644 .github/workflows/update-release-draft.yml diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml new file mode 100644 index 0000000..0efc2c1 --- /dev/null +++ b/.github/release-drafter.yml @@ -0,0 +1,9 @@ +_extends: jellyfin-meta-plugins + +template: | + + [Plugin build can be downloaded here](https://repo.jellyfin.org/releases/plugin/anidb/anidb_$NEXT_MAJOR_VERSION.0.0.0.zip). + + ## :sparkles: What's New + + $CHANGES diff --git a/.github/workflows/create-github-release.yml b/.github/workflows/create-github-release.yml new file mode 100644 index 0000000..4670771 --- /dev/null +++ b/.github/workflows/create-github-release.yml @@ -0,0 +1,19 @@ +name: Publish Drafted GitHub Release + +on: + push: + tags: [ 'v*' ] + +jobs: + publish_release_draft: + runs-on: ubuntu-latest + 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 }} diff --git a/.github/workflows/update-release-draft.yml b/.github/workflows/update-release-draft.yml new file mode 100644 index 0000000..a2dc99c --- /dev/null +++ b/.github/workflows/update-release-draft.yml @@ -0,0 +1,16 @@ +# Automates creation of Release Drafts using Release Drafter +name: Update Release Draft + +on: + push: + branches: + - master + +jobs: + update_release_draft: + runs-on: ubuntu-latest + steps: + # Drafts your next Release notes as Pull Requests are merged into "master" + - uses: release-drafter/release-drafter@v5.14.0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}