From b14c3d76bd0b7e5790f46b2b5d42cdb3a706ab3a Mon Sep 17 00:00:00 2001 From: Noah Mitchem <52387885+NMitchem@users.noreply.github.com> Date: Fri, 13 Mar 2026 11:32:04 -0700 Subject: [PATCH] Update release script --- .github/workflows/release.yml | 38 ++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fe40630..c41911c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,7 +16,7 @@ concurrency: cancel-in-progress: false permissions: - contents: read + contents: write env: BUN_VERSION: "1.3.1" @@ -299,3 +299,39 @@ jobs: git add Formula/ git commit -m "Update saguaro formula to ${version}" git push --force-with-lease origin staged + + # ── Create GitHub Release ──────────────────────────────────────────── + github-release: + name: Create GitHub Release + needs: [detect, publish-npm, build] + if: needs.detect.outputs.dry_run != 'true' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/download-artifact@v4 + with: + pattern: binary-* + merge-multiple: true + + - name: Create GitHub Release + env: + GH_TOKEN: ${{ github.token }} + shell: bash + run: | + set -euo pipefail + version="${{ needs.detect.outputs.version }}" + tag="v${version}" + + if gh release view "$tag" >/dev/null 2>&1; then + echo "Release $tag already exists, skipping." + exit 0 + fi + + git tag "$tag" + git push origin "$tag" + + gh release create "$tag" \ + saguaro-*.tar.gz \ + --title "Saguaro v${version}" \ + --generate-notes