From b2c7f22e3f6a8a33a3f2181fc9e1452bfe1b9082 Mon Sep 17 00:00:00 2001 From: Jay Dolan Date: Tue, 17 Mar 2026 19:59:57 -0400 Subject: [PATCH] Update actions to Node.js 24 and publish release on push MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - actions/checkout v4 → v6 - actions/setup-java v4 → v5 - actions/upload-artifact v4 → v6 - Add release publishing step: creates/updates a 'latest' prerelease with quetoo-installer-small.jar on every push to main - Change permissions to contents: write for release creation Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/build.yml | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 892ab6a..8b66eb0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,7 +7,7 @@ on: branches: [ "main" ] permissions: - contents: read + contents: write jobs: build: @@ -15,10 +15,10 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Set up JDK 21 - uses: actions/setup-java@v4 + uses: actions/setup-java@v5 with: distribution: temurin java-version: 21 @@ -28,7 +28,19 @@ jobs: run: mvn -B package - name: Upload artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v6 with: name: quetoo-installer-small path: target/quetoo-installer-small.jar + + - name: Publish release + if: github.event_name == 'push' && github.ref == 'refs/heads/main' + env: + GH_TOKEN: ${{ github.token }} + run: | + gh release delete latest --yes --cleanup-tag 2>/dev/null || true + gh release create latest \ + --title "Latest Build" \ + --notes "Automatically updated on every push to main." \ + --prerelease \ + target/quetoo-installer-small.jar