Skip to content

Commit 5826c04

Browse files
authored
ci(node): [RO-13533] Adds NPM publish ci config (#59)
1 parent c04d95e commit 5826c04

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

.github/workflows/npm-publish.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Publish Package to npmjs
2+
on:
3+
release:
4+
types: [created]
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v3
10+
# Setup .npmrc file to publish to npm
11+
- uses: actions/setup-node@v3
12+
with:
13+
node-version: '16.x'
14+
registry-url: 'https://registry.npmjs.org'
15+
- run: npm ci
16+
- run: npm publish
17+
env:
18+
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_SPUR_TOKEN }}

.github/workflows/pull-request.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ jobs:
1717
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
1818

1919
steps:
20-
- uses: actions/checkout@v2
20+
- uses: actions/checkout@v3
2121
- name: Use Node.js ${{ matrix.node-version }}
22-
uses: actions/setup-node@v2
22+
uses: actions/setup-node@v3
2323
with:
2424
node-version: ${{ matrix.node-version }}
2525
cache: 'npm'

0 commit comments

Comments
 (0)