diff --git a/.github/workflows/rolling-release.yml b/.github/workflows/rolling-release.yml index 5c24934..49e94d5 100644 --- a/.github/workflows/rolling-release.yml +++ b/.github/workflows/rolling-release.yml @@ -255,13 +255,14 @@ jobs: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | NIGHTLY_TAG="${{ steps.tag.outputs.nightly_tag }}" + ASSETS_DIR="/tmp/nightly-assets" # Download all assets from the per-commit nightly release - mkdir -p /tmp/nightly-assets - cd /tmp/nightly-assets - gh release download "$NIGHTLY_TAG" --clobber + mkdir -p "$ASSETS_DIR" + gh release download "$NIGHTLY_TAG" --dir "$ASSETS_DIR" --clobber # Rename versioned filenames to stable nightly names + cd "$ASSETS_DIR" 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 @@ -271,18 +272,17 @@ jobs: 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 + cd "$GITHUB_WORKSPACE" # Delete existing rolling nightly release and tag gh release delete nightly --yes 2>/dev/null || true - cd "$GITHUB_WORKSPACE" git push --delete origin nightly 2>/dev/null || true # Create new rolling nightly release with all assets - cd /tmp/nightly-assets gh release create nightly \ - Donut_nightly_* \ - Donut_aarch64.app.tar.gz \ - Donut_x64.app.tar.gz \ + "$ASSETS_DIR"/Donut_nightly_* \ + "$ASSETS_DIR"/Donut_aarch64.app.tar.gz \ + "$ASSETS_DIR"/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