Skip to content

Commit 2bcc477

Browse files
authored
Merge pull request #40 from vivshankar/feature/docs-update-action
ci: upgrade Node version
2 parents a8cc82a + 6407a58 commit 2bcc477

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

.github/workflows/publishpackage.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ name: Publish packages to NPM
33
on:
44
release:
55
types: [created]
6+
push:
7+
tags:
8+
- '**'
69

710
permissions:
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

0 commit comments

Comments
 (0)