diff --git a/.forgejo/workflows/plugins.yml b/.forgejo/workflows/plugins.yml index 46413a88..50a26ab8 100644 --- a/.forgejo/workflows/plugins.yml +++ b/.forgejo/workflows/plugins.yml @@ -57,13 +57,18 @@ jobs: if-no-files-found: error - name: Test and build the replacement DuneMenus plugin - if: github.repository == 'dev/MC' - run: gradle --no-daemon -p DuneMenus test jar + shell: bash + run: | + set -euo pipefail + gradle --no-daemon -p DuneMenus test jar + mkdir -p dunemenus-artifacts + cp DuneMenus/build/libs/DuneMenus.jar dunemenus-artifacts/ + printf '%s\n' "$(git rev-parse HEAD)" > dunemenus-artifacts/SOURCE_COMMIT + (cd dunemenus-artifacts && sha256sum -- DuneMenus.jar SOURCE_COMMIT > SHA256SUMS) - uses: actions/upload-artifact@v3 - if: github.repository == 'dev/MC' with: - name: DuneMenus-Development - path: DuneMenus/build/libs/DuneMenus.jar + name: ${{ github.repository == 'dev/MC' && 'DuneMenus-Development' || 'DuneMenus' }} + path: dunemenus-artifacts/ if-no-files-found: error - uses: actions/setup-java@v4