Skip to content

Commit 0c7d7ae

Browse files
authored
fix: pre releases for npm (#419)
1 parent a022690 commit 0c7d7ae

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

.github/workflows/release.yaml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,13 @@ jobs:
2424
- run: yarn playwright install
2525
- run: yarn test
2626
- run: yarn build:lib
27-
- name: Read version and publish
28-
run: npm publish --access public
27+
- name: Publish
28+
run: |
29+
VERSION=$(node -p "require('./package.json').version")
30+
if [[ "$VERSION" == *-* ]]; then
31+
TAG="${VERSION#*-}"
32+
TAG="${TAG%%.*}"
33+
npm publish --access public --tag "$TAG"
34+
else
35+
npm publish --access public
36+
fi

0 commit comments

Comments
 (0)