From 02f36e979361bc6e0173130893166f7be3dde379 Mon Sep 17 00:00:00 2001 From: freezy Date: Thu, 20 Feb 2025 09:54:13 +0100 Subject: [PATCH 1/4] ci: Bump actions to latest. --- .github/workflows/build.yml | 8 ++++---- .github/workflows/publish.yml | 22 ++++++++++++---------- .github/workflows/release.yml | 6 +++--- 3 files changed, 19 insertions(+), 17 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f817eef..ecc86dd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,8 +26,8 @@ jobs: - os: ubuntu-latest rid: android-arm64-v8a steps: - - uses: actions/checkout@v3 - - uses: actions/setup-dotnet@v1 + - uses: actions/checkout@v4 + - uses: actions/setup-dotnet@v4 with: dotnet-version: '3.1.x' - name: Build @@ -41,7 +41,7 @@ jobs: - run: | mkdir tmp cp -r VisualPinball.Engine.PinMAME.Unity/Plugins/${{ matrix.rid }} tmp - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: Plugins path: tmp @@ -51,7 +51,7 @@ jobs: needs: [ build ] if: github.repository == 'VisualPinball/VisualPinball.Engine.PinMAME' && github.ref == 'refs/heads/master' && github.event_name == 'push' steps: - - uses: peter-evans/repository-dispatch@v1 + - uses: peter-evans/repository-dispatch@v3 with: token: ${{ secrets.GH_PAT }} event-type: build-complete diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 1355660..296bbc4 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -4,19 +4,21 @@ on: types: [ release-complete ] jobs: - registry: + publish-registry: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: dawidd6/action-download-artifact@v2 + - uses: actions/checkout@v4 + - uses: actions/download-artifact@v4 with: - workflow: build - run_id: ${{ github.event.client_payload.artifacts_run_id }} + merge-multiple: true + github-token: ${{ secrets.GITHUB_TOKEN }} + run-id: ${{ github.event.client_payload.artifacts_run_id }} path: VisualPinball.Engine.PinMAME.Unity + - uses: actions/setup-node@v4 + with: + node-version: '20.x' + registry-url: 'https://registry.visualpinball.org' - name: Publish - run: | - cd VisualPinball.Engine.PinMAME.Unity - echo "//registry.visualpinball.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc - npm publish + run: npm publish env: - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 72b3d5b..1ff557f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,7 +7,7 @@ jobs: release: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Fetch next version @@ -31,7 +31,7 @@ jobs: git commit -m "release: ${{ steps.nextVersion.outputs.nextTag }}." git push commitish=$(git rev-parse HEAD) - echo ::set-output name=commitish::${commitish} + echo "commitish=${commitish}" >> $GITHUB_OUTPUT env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Create Release @@ -48,7 +48,7 @@ jobs: runs-on: ubuntu-latest needs: [ release ] steps: - - uses: peter-evans/repository-dispatch@v1 + - uses: peter-evans/repository-dispatch@v3 with: token: ${{ secrets.GH_PAT }} event-type: release-complete From b8af7df491bc371040f004a60f4f1c0e8ddb3993 Mon Sep 17 00:00:00 2001 From: freezy Date: Thu, 20 Feb 2025 10:04:04 +0100 Subject: [PATCH 2/4] ci: Upload to separate folders. --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ecc86dd..eefd38d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -43,7 +43,7 @@ jobs: cp -r VisualPinball.Engine.PinMAME.Unity/Plugins/${{ matrix.rid }} tmp - uses: actions/upload-artifact@v4 with: - name: Plugins + name: Plugins-${{ matrix.rid }} path: tmp dispatch: From 44b9a5f2372edcefcc07a30a6ade6feb8a883ebb Mon Sep 17 00:00:00 2001 From: freezy Date: Thu, 20 Feb 2025 10:10:35 +0100 Subject: [PATCH 3/4] ci: Use Ubuntu 22.04 instead of latest. --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index eefd38d..1e9bcd7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,9 +21,9 @@ jobs: rid: osx - os: macos-latest rid: ios-arm64 - - os: ubuntu-latest + - os: ubuntu-22.04 rid: linux-x64 - - os: ubuntu-latest + - os: ubuntu-22.04 rid: android-arm64-v8a steps: - uses: actions/checkout@v4 From a03307a8173f71dc2f3cd6b2bfe2a3e8846146f1 Mon Sep 17 00:00:00 2001 From: freezy Date: Thu, 20 Feb 2025 10:14:53 +0100 Subject: [PATCH 4/4] ci: Reference correct NuGet PinMame version. --- .../VisualPinball.Engine.PinMAME.csproj | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/VisualPinball.Engine.PinMAME/VisualPinball.Engine.PinMAME.csproj b/VisualPinball.Engine.PinMAME/VisualPinball.Engine.PinMAME.csproj index 9b24dd4..09a4aa4 100644 --- a/VisualPinball.Engine.PinMAME/VisualPinball.Engine.PinMAME.csproj +++ b/VisualPinball.Engine.PinMAME/VisualPinball.Engine.PinMAME.csproj @@ -13,7 +13,7 @@ linux-x64 - + @@ -26,10 +26,10 @@ - + - +