Skip to content

Commit 0c409fe

Browse files
committed
ci: flag pre-release tags so they don't become "latest" (#13 prep)
The release workflow uses softprops/action-gh-release without setting prerelease. Tags like v0.5.1-rc1 would get published as full releases, and GitHub's /releases/latest endpoint could return them. install.sh and install.ps1 both call /releases/latest to discover the current version when the user has not pinned VERSION. If an rc were marked latest, every user running the install one-liner would get pulled onto an rc without asking. Auto-flag anything with -rc, -beta, or -alpha in the tag name as prerelease. Clean semver tags (v0.5.1, v1.0.0) continue to publish as full releases exactly as before.
1 parent 592271e commit 0c409fe

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,12 @@ jobs:
7777
uses: softprops/action-gh-release@v2
7878
with:
7979
name: SMART Sniffer v${{ steps.version.outputs.VERSION }}
80+
# Auto-flag any tag with -rc, -beta, or -alpha as a pre-release
81+
# so GitHub's "latest release" endpoint skips it. install.sh and
82+
# install.ps1 both call that endpoint for version discovery; if
83+
# an rc were marked latest, every user running the install one-
84+
# liner without pinning VERSION would be pulled onto an rc.
85+
prerelease: ${{ contains(github.ref_name, '-rc') || contains(github.ref_name, '-beta') || contains(github.ref_name, '-alpha') }}
8086
body: |
8187
${{ steps.changelog.outputs.NOTES }}
8288

0 commit comments

Comments
 (0)