Skip to content

Commit 8f5fbad

Browse files
authored
Publish to NPM from deployment workflow. (#69)
1 parent 92de66c commit 8f5fbad

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

.github/workflows/cd.yaml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,10 @@ jobs:
1818
uses: actions/checkout@v2
1919

2020
- name: Setup Node
21-
uses: actions/setup-node@v1
21+
uses: actions/setup-node@v2
2222
with:
23-
node-version: 16
23+
node-version: '16.x'
24+
registry-url: 'https://registry.npmjs.org'
2425

2526
- name: Fetch AWS Credentials
2627
run: |
@@ -44,14 +45,19 @@ jobs:
4445
4546
- name: Build Release
4647
run: |
47-
npm install
48+
npm ci
4849
npm run release
4950
5051
- name: Publish to CloudWatch RUM CDN
5152
run: |
5253
aws s3api put-object --bucket ${{ secrets.BUCKET }} --key 'content/${{ github.event.inputs.version }}/cwr.js' --body build/assets/cwr.js
5354
aws s3api put-object --bucket ${{ secrets.BUCKET }} --key 'content/${{ github.event.inputs.version }}/LICENSE-THIRD-PARTY' --body LICENSE-THIRD-PARTY
5455
56+
- name: Publish to NPM
57+
run: npm publish
58+
env:
59+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
60+
5561
- name: Create GitHub Release
5662
id: create_release
5763
uses: actions/create-release@v1

0 commit comments

Comments
 (0)