-
Notifications
You must be signed in to change notification settings - Fork 23
45 lines (37 loc) · 1.05 KB
/
publish.yaml
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
name: NPM Publish
on:
release:
types:
- created
jobs:
publish:
runs-on: ubuntu-latest
env:
NPM_REGISTRY: registry.npmjs.org/
NPM_SCOPE: blazity
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16
- name: Authenticate npm
run: |
npm config set @${{ env.NPM_SCOPE }}:registry https://${{ env.NPM_REGISTRY }}
npm config set -- '//${{ env.NPM_REGISTRY }}:_authToken' "${{ secrets.NPM_PUBLISH_TOKEN }}"
- uses: actions/[email protected]
id: yarn-cache
with:
path: |
node_modules
${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn install --prefer-offline --frozen-lockfile
env:
ADBLOCK: true
- name: Build
run: yarn build
- name: Publish
run: npm publish