From 6a53f86aea3773270896a9205fbfad982b842a35 Mon Sep 17 00:00:00 2001 From: Jan-Henrik Bruhn Date: Thu, 11 Dec 2025 13:06:43 +0100 Subject: [PATCH] Add GitHub Pages deployment and consolidate release uploads MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Upload build outputs as workflow artifacts (windows/macos/linux) - Add upload-to-release job that consolidates all platform uploads - Add publish-to-pages job that deploys to GitHub Pages - Add required permissions for Pages deployment Build artifacts are now available in two places: - GitHub Release for manual downloads - GitHub Pages /update/ for auto-update systems 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 --- .github/workflows/release.yml | 86 +++++++++++++++++++++++++++-------- 1 file changed, 66 insertions(+), 20 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6e5e83b..51fa7db 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,6 +9,8 @@ on: permissions: contents: write pull-requests: write + pages: write + id-token: write jobs: draft-release: @@ -55,30 +57,74 @@ jobs: - name: Package and make run: npm run make - - name: Upload Windows assets + - name: Upload Windows artifacts if: matrix.os == 'windows-latest' - shell: bash - run: | - for file in out/make/squirrel.windows/x64/*; do - gh release upload ${{ needs.draft-release.outputs.tag-name }} "$file" --clobber - done - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + uses: actions/upload-artifact@v4 + with: + name: windows-artifacts + path: out/make/squirrel.windows/x64/* - - name: Upload macOS assets + - name: Upload macOS artifacts if: matrix.os == 'macos-latest' + uses: actions/upload-artifact@v4 + with: + name: macos-artifacts + path: | + out/make/zip/darwin/**/*.zip + out/make/zip/darwin/**/*RELEASES.json + out/make/*.dmg + + - name: Upload Linux artifacts + if: matrix.os == 'ubuntu-latest' + uses: actions/upload-artifact@v4 + with: + name: linux-artifacts + path: | + out/make/rpm/x64/*.rpm + out/make/deb/x64/*.deb + out/make/AppImage/x64/*.AppImage + + upload-to-release: + name: Upload to GitHub Release + needs: [draft-release, build-release] + if: needs.draft-release.outputs.tag-name != '' + runs-on: ubuntu-latest + + steps: + - name: Download all artifacts + uses: actions/download-artifact@v4 + with: + path: artifacts + + - name: Upload all assets to release run: | - for file in out/make/zip/darwin/**/*.zip out/make/zip/darwin/**/*RELEASES.json out/make/*.dmg; do - gh release upload ${{ needs.draft-release.outputs.tag-name }} "$file" --clobber - done + find artifacts -type f -exec gh release upload ${{ needs.draft-release.outputs.tag-name }} {} --clobber \; env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Upload Linux assets - if: matrix.os == 'ubuntu-latest' - run: | - for file in out/make/rpm/x64/*.rpm out/make/deb/x64/*.deb out/make/AppImage/x64/*.AppImage; do - gh release upload ${{ needs.draft-release.outputs.tag-name }} "$file" --clobber - done - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + publish-to-pages: + name: Publish to GitHub Pages + needs: [draft-release, build-release] + if: needs.draft-release.outputs.tag-name != '' + runs-on: ubuntu-latest + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + + steps: + - name: Download all artifacts + uses: actions/download-artifact@v4 + with: + path: update + + - name: Setup Pages + uses: actions/configure-pages@v4 + + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: 'update' + + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4