From 144b31bf15da756291fffc557d85dddac4c8ac94 Mon Sep 17 00:00:00 2001 From: Cody Robibero Date: Sat, 19 Mar 2022 08:41:09 -0600 Subject: [PATCH] Use meta ci --- .github/workflows/build-dotnet.yml | 36 -------------------- .github/workflows/build.yaml | 18 ++++++++++ .github/workflows/bump-version.yaml | 14 ++++++++ .github/workflows/changelog.yaml | 20 +++++++++++ .github/workflows/codeql-analysis.yml | 45 ------------------------- .github/workflows/command-dispatch.yaml | 13 +++++++ .github/workflows/command-rebase.yaml | 16 +++++++++ .github/workflows/publish.yaml | 18 ++++++++++ .github/workflows/scan-codeql.yaml | 12 +++++++ .github/workflows/sync-labels.yaml | 12 +++++++ .github/workflows/test-dotnet.yml | 31 ----------------- .github/workflows/test.yaml | 18 ++++++++++ 12 files changed, 141 insertions(+), 112 deletions(-) delete mode 100644 .github/workflows/build-dotnet.yml create mode 100644 .github/workflows/build.yaml create mode 100644 .github/workflows/bump-version.yaml create mode 100644 .github/workflows/changelog.yaml delete mode 100644 .github/workflows/codeql-analysis.yml create mode 100644 .github/workflows/command-dispatch.yaml create mode 100644 .github/workflows/command-rebase.yaml create mode 100644 .github/workflows/publish.yaml create mode 100644 .github/workflows/scan-codeql.yaml create mode 100644 .github/workflows/sync-labels.yaml delete mode 100644 .github/workflows/test-dotnet.yml create mode 100644 .github/workflows/test.yaml diff --git a/.github/workflows/build-dotnet.yml b/.github/workflows/build-dotnet.yml deleted file mode 100644 index 9878d77..0000000 --- a/.github/workflows/build-dotnet.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: 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 - uses: actions/setup-dotnet@v2 - with: - dotnet-version: 6.0.x - - - name: Build Jellyfin Plugin - uses: oddstr13/jellyfin-plugin-repository-manager@v0.4.2 - id: jprm - with: - dotnet-target: net6.0 - - - name: Upload Artifact - uses: actions/upload-artifact@v2 - with: - name: build-artifact - retention-days: 30 - if-no-files-found: error - path: ${{ steps.jprm.outputs.artifact }} diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..f290747 --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,18 @@ +name: '๐Ÿ—๏ธ Build Plugin' + +on: + push: + branches: + - master + paths-ignore: + - '**/*.md' + pull_request: + branches: + - master + paths-ignore: + - '**/*.md' + workflow_dispatch: + +jobs: + call: + uses: jellyfin/jellyfin-meta-plugins/.github/workflows/build.yaml@master diff --git a/.github/workflows/bump-version.yaml b/.github/workflows/bump-version.yaml new file mode 100644 index 0000000..3c2e726 --- /dev/null +++ b/.github/workflows/bump-version.yaml @@ -0,0 +1,14 @@ +name: "๐Ÿ†™ Bump Version" + +on: + release: + types: + - published + workflow_dispatch: + +jobs: + call: + uses: jellyfin/jellyfin-meta-plugins/.github/workflows/bump-version.yaml@master + with: + csproj-name: Jellyfin.Plugin.Template + is-unstable: ${{ github.event.release.prerelease }} diff --git a/.github/workflows/changelog.yaml b/.github/workflows/changelog.yaml new file mode 100644 index 0000000..0985f99 --- /dev/null +++ b/.github/workflows/changelog.yaml @@ -0,0 +1,20 @@ +name: '๐Ÿ“ Create/Update Release Draft & Release Bump PR' + +on: + push: + branches: + - master + paths-ignore: + - build.yaml + workflow_dispatch: + repository_dispatch: + types: + - update-prep-command + +jobs: + call: + uses: jellyfin/jellyfin-meta-plugins/.github/workflows/changelog.yaml@master + with: + repository-name: jellyfin/jellyfin-plugin-template + secrets: + token: ${{ secrets.JF_BOT_TOKEN }} diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml deleted file mode 100644 index 3a8cca3..0000000 --- a/.github/workflows/codeql-analysis.yml +++ /dev/null @@ -1,45 +0,0 @@ -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 - if: github.repository == 'jellyfin/jellyfin-plugin-template' - - strategy: - fail-fast: false - matrix: - language: [ 'csharp' ] - - steps: - - name: Checkout repository - uses: actions/checkout@v2 - - - name: Setup .NET Core - uses: actions/setup-dotnet@v2 - with: - dotnet-version: 6.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 diff --git a/.github/workflows/command-dispatch.yaml b/.github/workflows/command-dispatch.yaml new file mode 100644 index 0000000..66b1703 --- /dev/null +++ b/.github/workflows/command-dispatch.yaml @@ -0,0 +1,13 @@ +# Allows for the definition of PR and Issue /commands +name: '๐Ÿ“Ÿ Slash Command Dispatcher' + +on: + issue_comment: + types: + - created + +jobs: + call: + uses: jellyfin/jellyfin-meta-plugins/.github/workflows/command-dispatch.yaml@master + secrets: + token: ${{ secrets.JF_BOT_TOKEN }} diff --git a/.github/workflows/command-rebase.yaml b/.github/workflows/command-rebase.yaml new file mode 100644 index 0000000..fa3cbbc --- /dev/null +++ b/.github/workflows/command-rebase.yaml @@ -0,0 +1,16 @@ +name: '๐Ÿ”€ PR Rebase Command' + +on: + repository_dispatch: + types: + - rebase-command + +jobs: + call: + uses: jellyfin/jellyfin-meta-plugins/.github/workflows/command-rebase.yaml@master + with: + rebase-head: ${{ github.event.client_payload.pull_request.head.label }} + repository-full-name: ${{ github.event.client_payload.github.payload.repository.full_name }} + comment-id: ${{ github.event.client_payload.github.payload.comment.id }} + secrets: + token: ${{ secrets.JF_BOT_TOKEN }} diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml new file mode 100644 index 0000000..80483cf --- /dev/null +++ b/.github/workflows/publish.yaml @@ -0,0 +1,18 @@ +name: '๐Ÿš€ Publish Plugin' + +on: + release: + types: + - released + workflow_dispatch: + +jobs: + call: + uses: jellyfin/jellyfin-meta-plugins/.github/workflows/publish.yaml@master + with: + version: ${{ github.event.release.tag_name }} + is-unstable: ${{ github.event.release.prerelease }} + secrets: + deploy-host: ${{ secrets.DEPLOY_HOST }} + deploy-user: ${{ secrets.DEPLOY_USER }} + deploy-key: ${{ secrets.DEPLOY_KEY }} diff --git a/.github/workflows/scan-codeql.yaml b/.github/workflows/scan-codeql.yaml new file mode 100644 index 0000000..ef0fe87 --- /dev/null +++ b/.github/workflows/scan-codeql.yaml @@ -0,0 +1,12 @@ +name: '๐Ÿ”ฌ Run CodeQL' + +on: + push: + pull_request: + workflow_dispatch: + +jobs: + call: + uses: jellyfin/jellyfin-meta-plugins/.github/workflows/scan-codeql.yaml@master + with: + repository-name: jellyfin/jellyfin-plugin-template diff --git a/.github/workflows/sync-labels.yaml b/.github/workflows/sync-labels.yaml new file mode 100644 index 0000000..5e06ae4 --- /dev/null +++ b/.github/workflows/sync-labels.yaml @@ -0,0 +1,12 @@ +name: '๐Ÿท๏ธ Sync labels' + +on: + schedule: + - cron: '0 0 1 * *' + workflow_dispatch: + +jobs: + call: + uses: jellyfin/jellyfin-meta-plugins/.github/workflows/sync-labels.yaml@master + secrets: + token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/test-dotnet.yml b/.github/workflows/test-dotnet.yml deleted file mode 100644 index 62ad14d..0000000 --- a/.github/workflows/test-dotnet.yml +++ /dev/null @@ -1,31 +0,0 @@ -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@v2 - with: - dotnet-version: 6.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 diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 0000000..d90b14d --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,18 @@ +name: '๐Ÿงช Test Plugin' + +on: + push: + branches: + - master + paths-ignore: + - '**/*.md' + pull_request: + branches: + - master + paths-ignore: + - '**/*.md' + workflow_dispatch: + +jobs: + call: + uses: jellyfin/jellyfin-meta-plugins/.github/workflows/test.yaml@master