Skip to content

Commit 99696f3

Browse files
Merge pull request #17 from contentstack/workflow-fix
Updated the workflow
2 parents 4bcf59e + 5e1f329 commit 99696f3

2 files changed

Lines changed: 11 additions & 11 deletions

File tree

.github/workflows/npm-publish-github-packages.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
22
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
33

4-
name: Node.js Package
4+
name: Publish package to Github registry
55

66
on:
77
release:
@@ -14,7 +14,7 @@ jobs:
1414
- uses: actions/checkout@v3
1515
- uses: actions/setup-node@v3
1616
with:
17-
node-version: 14
17+
node-version: 18
1818
- run: npm ci
1919
- run: npm test
2020

@@ -28,9 +28,9 @@ jobs:
2828
- uses: actions/checkout@v3
2929
- uses: actions/setup-node@v3
3030
with:
31-
node-version: 14
31+
node-version: 18
3232
registry-url: https://npm.pkg.github.com/
3333
- run: npm ci
3434
- run: npm publish
3535
env:
36-
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
36+
NODE_AUTH_TOKEN: ${{secrets.PKG_TOKEN}}

.github/workflows/npm-publish.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
22
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
33

4-
name: Node.js Package
4+
name: Publish package to NPM registry
55

66
on:
77
release:
@@ -11,21 +11,21 @@ jobs:
1111
build:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v2
15-
- uses: actions/setup-node@v2
14+
- uses: actions/checkout@v3
15+
- uses: actions/setup-node@v3
1616
with:
17-
node-version: 16
17+
node-version: 18
1818
- run: npm ci
1919
- run: npm test
2020

2121
publish-npm:
2222
needs: build
2323
runs-on: ubuntu-latest
2424
steps:
25-
- uses: actions/checkout@v2
26-
- uses: actions/setup-node@v2
25+
- uses: actions/checkout@v3
26+
- uses: actions/setup-node@v3
2727
with:
28-
node-version: 16
28+
node-version: 18
2929
registry-url: https://registry.npmjs.org/
3030
- run: npm ci
3131
- run: npm publish

0 commit comments

Comments
 (0)