Skip to content

Commit 43162ec

Browse files
committed
only call npm version if alpha or beta
1 parent 29719d2 commit 43162ec

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.github/workflows/npm_publish.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,20 @@ jobs:
1616
run: git config --global user.name ${{ github.actor }}
1717
- name: Set git user email
1818
run: git config --global user.email "github-action-${{ github.actor }}.users.noreply.github.com"
19-
- name: Set package version to tag name
20-
run: npm version ${{ github.event.release.tag_name }}
2119
- name: Install dependencies and build
2220
run: npm ci
2321
- name: Publish package to npm
2422
run: |
2523
if
2624
[[ ${{ github.event.release.tag_name }} == *'alpha'* ]];
2725
then
28-
npm publish --tag alpha
26+
npm version ${{ github.event.release.tag_name }};
27+
npm publish --tag alpha;
2928
elif
3029
[[ ${{ github.event.release.tag_name }} == *'beta'* ]];
3130
then
32-
npm publish --tag beta
31+
npm version ${{ github.event.release.tag_name }};
32+
npm publish --tag beta;
3333
else
3434
npm publish
3535
fi

0 commit comments

Comments
 (0)