Skip to content

Commit fd04cfd

Browse files
committed
build: add npm publication logic
1 parent 724b55c commit fd04cfd

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,19 @@ jobs:
1313
token: ${{ secrets.GITHUB_TOKEN }}
1414
release-type: node
1515
bump-minor-pre-major: true
16+
# The logic below handles the npm publication:
17+
- uses: actions/checkout@v2
18+
# these if statements ensure that a publication only occurs when
19+
# a new release is created:
20+
if: ${{ steps.release.outputs.release_created }}
21+
- uses: actions/setup-node@v1
22+
with:
23+
node-version: 16
24+
registry-url: 'https://external-dot-oss-automation.appspot.com'
25+
if: ${{ steps.release.outputs.release_created }}
26+
- run: npm ci
27+
if: ${{ steps.release.outputs.release_created }}
28+
- run: npm publish
29+
env:
30+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
31+
if: ${{ steps.release.outputs.release_created }}

0 commit comments

Comments
 (0)