Skip to content

Commit 9a6ac8a

Browse files
authored
Update release-package.yml
1 parent 1d915be commit 9a6ac8a

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/workflows/release-package.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,43 @@ jobs:
5555
env:
5656
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
5757
working-directory: ch8_packages/npm
58+
59+
publish-npm:
60+
needs: publish-gpr
61+
runs-on: ubuntu-latest
62+
environment: NPM
63+
permissions:
64+
packages: write
65+
contents: read
66+
steps:
67+
- uses: actions/checkout@v2
68+
with:
69+
fetch-depth: 0
70+
71+
- uses: actions/setup-node@v2
72+
with:
73+
node-version: 12
74+
registry-url: https://registry.npmjs.org
75+
76+
- name: Install GitVersion
77+
uses: gittools/actions/gitversion/[email protected]
78+
with:
79+
versionSpec: '5.x'
80+
81+
- name: Determine Version
82+
id: gitversion
83+
uses: gittools/actions/gitversion/[email protected]
84+
85+
- name: 'Change NPM version'
86+
uses: reedyuk/[email protected]
87+
with:
88+
version: $GITVERSION_SEMVER
89+
package: ch8_packages/npm
90+
91+
- run: npm ci
92+
working-directory: ch8_packages/npm
93+
94+
- run: npm publish
95+
env:
96+
NODE_AUTH_TOKEN: ${{secrets.NPM_PAT}}
97+
working-directory: ch8_packages/npm

0 commit comments

Comments
 (0)