Skip to content

Commit 8f16414

Browse files
ci: tag prereleases as 'alpha' so 'latest' tracks stable only
npm publish requires --tag for hyphenated versions. Map any v*-* tag to --tag alpha; everything else stays on the default 'latest'. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 3f48ff5 commit 8f16414

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

‎.github/workflows/release.yaml‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,18 @@ jobs:
7777
- name: Copy LICENSE into package
7878
run: cp LICENSE packages/managed-auth-react/LICENSE
7979

80+
# npm requires --tag for any version with a hyphen (alpha/beta/rc).
81+
# Stable releases get the default `latest` tag; prereleases land
82+
# under `alpha` so `npm install @onkernel/managed-auth-react` keeps
83+
# picking up stable versions only.
8084
- name: Publish to npm
8185
working-directory: packages/managed-auth-react
82-
run: npm publish --provenance --access public
86+
run: |
87+
NPM_TAG="latest"
88+
if [[ "$GITHUB_REF_NAME" == *-* ]]; then
89+
NPM_TAG="alpha"
90+
fi
91+
npm publish --provenance --access public --tag "$NPM_TAG"
8392
8493
- name: Create GitHub release
8594
env:

0 commit comments

Comments
 (0)