-
Notifications
You must be signed in to change notification settings - Fork 7
42 lines (38 loc) · 1007 Bytes
/
pre-release.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
name: Node.js Package Pre-Release
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Use Node.js LTS
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Install dependencies
run: yarn install
- name: Build package
run: yarn build
- name: Run tests
run: yarn test
publish-npm:
needs: build
runs-on: ubuntu-20.04
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Use Node.js LTS
uses: actions/setup-node@v2
with:
node-version: '14'
registry-url: https://registry.npmjs.org/
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Build package
run: yarn build
- name: Publish
run: npm publish --access=public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}