Skip to content

Commit d95a7d2

Browse files
committed
chore: enhance npm publish step to handle beta versions
1 parent c25ce9f commit d95a7d2

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

.github/workflows/publish.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,14 @@ jobs:
1010
- uses: actions/setup-node@v4
1111
with:
1212
node-version: '22'
13-
- run: cd packages/gatsby-theme-iterative && yarn npm publish
13+
- name: Publish package to npm
14+
run: |
15+
cd packages/gatsby-theme-iterative
16+
VERSION=$(node -p "require('./package.json').version")
17+
if [[ "$VERSION" == *"beta"* ]]; then
18+
yarn npm publish --tag beta
19+
else
20+
yarn npm publish
21+
fi
1422
env:
1523
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)