-
Notifications
You must be signed in to change notification settings - Fork 2
42 lines (39 loc) · 1.03 KB
/
release-package.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Node.js Package
on:
release:
types: [released]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- run: npm ci
working-directory: ./generated/js
- run: npm test
working-directory: ./generated/js
publish-gpr:
needs: build
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
registry-url: https://registry.npmjs.org
- name: NPM clean install
run: npm ci
working-directory: ./generated/js
- name: Update NPM version to tag
run: npm version ${{github.ref_name}}
working-directory: ./generated/js
- name: Publish package on NPM 📦
working-directory: ./generated/js
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}