-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (35 loc) · 1.17 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
name: Publish Node.js Package
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- id: find-yarn-cache-folder
name: Find Yarn's cache folder
run: echo "::set-output name=path::$(yarn config get cacheFolder)"
- name: Cache Yarn's cache folder
uses: actions/cache@v1
with:
path: ${{ steps.find-yarn-cache-folder.outputs.path }}
key: yarn-cache-folder-os-${{ runner.os }}-node-${{ env.node-version }}-${{ hashFiles('yarn.lock') }}
restore-keys: |
yarn-cache-folder-os-${{ runner.os }}-node-${{ env.node-version }}-
yarn-cache-folder-os-${{ runner.os }}-
- uses: actions/setup-node@v2
with:
node-version: '14.x'
registry-url: 'https://registry.npmjs.org'
scope: '@applicazza'
- name: Install
run: yarn
- name: Set npm auth token
run: yarn config set npmAuthToken ${{ secrets.NPM_TOKEN }}
- name: Build
run: yarn build
- name: Publish
run: yarn npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}