From dfc94c10ffbbd8ff038ba00d56ee5cf8b8b8a187 Mon Sep 17 00:00:00 2001 From: zhom <2717306+zhom@users.noreply.github.com> Date: Mon, 16 Feb 2026 20:45:38 +0400 Subject: [PATCH] chore: add latest release for nightly --- .github/workflows/release.yml | 14 ++++++++ .github/workflows/rolling-release.yml | 50 +++++++++++++++++++++++++++ 2 files changed, 64 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 346a2d6..1208544 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -230,3 +230,17 @@ jobs: # with: # branch: main # commit_message: "docs: update CHANGELOG.md for ${{ github.ref_name }} [skip ci]" + + bump-homebrew-cask: + needs: [release] + runs-on: macos-latest + permissions: + contents: read + steps: + - name: Bump Homebrew cask + env: + HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.HOMEBREW_GITHUB_API_TOKEN }} + run: | + VERSION="${GITHUB_REF_NAME#v}" + brew tap --force homebrew/cask + brew bump-cask-pr --version "$VERSION" --no-browse donutbrowser diff --git a/.github/workflows/rolling-release.yml b/.github/workflows/rolling-release.yml index 3063004..a340e7b 100644 --- a/.github/workflows/rolling-release.yml +++ b/.github/workflows/rolling-release.yml @@ -234,3 +234,53 @@ jobs: run: | security delete-keychain $RUNNER_TEMP/app-signing.keychain-db || true rm -f $RUNNER_TEMP/build_certificate.p12 || true + + update-nightly-release: + needs: [rolling-release] + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 #v6.0.1 + + - name: Generate nightly tag + id: tag + run: | + TIMESTAMP=$(date -u +"%Y-%m-%d") + COMMIT_HASH=$(echo "${GITHUB_SHA}" | cut -c1-7) + echo "nightly_tag=nightly-${TIMESTAMP}-${COMMIT_HASH}" >> $GITHUB_OUTPUT + + - name: Update rolling nightly release + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + NIGHTLY_TAG="${{ steps.tag.outputs.nightly_tag }}" + + # Download all assets from the per-commit nightly release + mkdir -p /tmp/nightly-assets + cd /tmp/nightly-assets + gh release download "$NIGHTLY_TAG" --clobber + + # Rename versioned filenames to stable nightly names + for f in Donut_*_aarch64.dmg; do [ -f "$f" ] && mv "$f" Donut_nightly_aarch64.dmg; done + for f in Donut_*_x64.dmg; do [ -f "$f" ] && mv "$f" Donut_nightly_x64.dmg; done + for f in Donut_*_x64-setup.exe; do [ -f "$f" ] && mv "$f" Donut_nightly_x64-setup.exe; done + for f in Donut_*_aarch64.AppImage; do [ -f "$f" ] && mv "$f" Donut_nightly_aarch64.AppImage; done + for f in Donut_*_amd64.AppImage; do [ -f "$f" ] && mv "$f" Donut_nightly_amd64.AppImage; done + for f in Donut_*_amd64.deb; do [ -f "$f" ] && mv "$f" Donut_nightly_amd64.deb; done + for f in Donut_*_arm64.deb; do [ -f "$f" ] && mv "$f" Donut_nightly_arm64.deb; done + for f in Donut-*.x86_64.rpm; do [ -f "$f" ] && mv "$f" Donut_nightly_x86_64.rpm; done + for f in Donut-*.aarch64.rpm; do [ -f "$f" ] && mv "$f" Donut_nightly_aarch64.rpm; done + + # Delete existing rolling nightly release and tag + gh release delete nightly --yes 2>/dev/null || true + git push --delete origin nightly 2>/dev/null || true + + # Create new rolling nightly release with all assets + gh release create nightly \ + Donut_nightly_* \ + Donut_aarch64.app.tar.gz \ + Donut_x64.app.tar.gz \ + --title "Donut Browser Nightly" \ + --notes "Automatically updated nightly build from the latest main branch. Install via \`brew install --cask donutbrowser@nightly\`.\n\nCommit: ${GITHUB_SHA}" \ + --prerelease