File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed
Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,9 @@ name: Publish packages to NPM
33on :
44 release :
55 types : [created]
6+ push :
7+ tags :
8+ - ' **'
69
710permissions :
811 id-token : write
@@ -16,14 +19,15 @@ jobs:
1619 contents : read
1720 packages : write
1821 steps :
19- - uses : actions/checkout@v2
22+ - uses : actions/checkout@v4
2023 # Setup .npmrc file to publish
21- - uses : actions/setup-node@v2
24+ - uses : actions/setup-node@v4
2225 with :
23- node-version : ' 16.x '
26+ node-version : 20
2427 registry-url : ' https://registry.npmjs.org'
2528 - name : Publish package to NPM
2629 env :
30+ EVENT_TYPE : ${{ github.event_name }}
2731 IS_PRERELEASE : ${{ github.event.release.prerelease }}
2832 run : |
2933 echo "Update npm"
@@ -35,11 +39,11 @@ jobs:
3539 # This step would fail if module is not a valid sdk
3640 cd ${GITHUB_WORKSPACE}/sdk/${MODULE}
3741
38- echo "Building package"
39- npm ci
40- npm run build --if-present
42+ # echo "Building package"
43+ # npm ci
44+ # npm run build --if-present
4145
42- if [ "$IS_PRERELEASE" = "true" ]; then
46+ if [[ "$EVENT_TYPE" == "push" || ["$ IS_PRERELEASE" == "true" ] ]; then
4347 echo "It's a pre-release."
4448 npm publish --dry-run --access public
4549 else
You can’t perform that action at this time.
0 commit comments