-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (43 loc) · 1.18 KB
/
publish.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
43
44
45
46
47
48
49
50
51
52
53
54
name: Publish
on:
release:
types:
- created
jobs:
publish:
name: Publish
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0 # Required to retrieve git history
- name: Setup Node
uses: actions/setup-node@v2-beta
with:
node-version: v14.16.0
registry-url: 'https://npm.pkg.github.com/group_name_to_be_updated'
- name: Cache node modules
id: cache
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: node_modules
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: npm install
# add test and coverage here?
# - name: Tests
# run: npm run test:ci
# - name: Check Coverage
# run: npm run checkcoverage:ci
- name: Lint
run: npm run lint
- name: Build
run: npm run build
- name: Publish Package
run: npm publish --access restricted --scope=@group_name_to_be_updated
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}