From fd59b83a0eaa9a3ebc80567ecf55de59d117bb9e Mon Sep 17 00:00:00 2001 From: Matthew Strasiotto <39424834+matthewstrasiotto@users.noreply.github.com> Date: Thu, 18 Aug 2022 18:10:12 +1000 Subject: [PATCH] ci: :construction_worker: keep our own build workflow and reference that in publish.yml Squash of - ci: :construction_worker: keep our own build workflow and reference that in publish.yml - ci: :pushpin: pin actions/checkout,setup-dotnet odstr13/jellyfin-plugin-repo-manager to approved version This will still fail because actions/upload-artifact isnt approved. Getting kind of tilted trying to contribute to ci when the upstream CI settings fight me at every turn --- .github/workflows/build.yml | 39 +++++++++++++++++++++++++++++++++++ .github/workflows/publish.yml | 2 +- 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..050cda8 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,39 @@ +on: + workflow_call: + inputs: + dotnet-version: + required: false + default: "6.0.x" + description: "The .NET version to setup for the build" + type: string + dotnet-target: + required: false + default: "net6.0" + description: "The .NET target to set for JPRM" + type: string + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v2 + + - name: Setup .NET + uses: actions/setup-dotnet@v1 + with: + dotnet-version: "${{ inputs.dotnet-version }}" + + - name: Build Jellyfin Plugin + uses: oddstr13/jellyfin-plugin-repository-manager@b9e92867a6aa279d611a5ea80cf61f6358838c39 + id: jprm + with: + dotnet-target: "${{ inputs.dotnet-target }}" + + - name: Upload Artifact + uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # tag=v3 + with: + name: build-artifact + retention-days: 30 + if-no-files-found: error + path: ${{ steps.jprm.outputs.artifact }} \ No newline at end of file diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 5b6401f..7e49b9a 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -8,7 +8,7 @@ on: jobs: build: - uses: jellyfin/jellyfin-meta-plugins/.github/workflows/build.yaml@30fd723cc3bafc4457a4a85be3cdbee2f3e2013b + uses: ./.github/workflows/build.yml with: dotnet-version: "6.0.*" dotnet-target: "net6.0"