-
Notifications
You must be signed in to change notification settings - Fork 6
49 lines (44 loc) · 1.77 KB
/
node.js.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
name: Build
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 12
- name: Setup
run: npm install --global yarn@1
- name: Install
run: yarn install --frozen-lockfile
- name: Test
run: yarn test # runs 'yarn build'
- run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
- name: Publish (NPM)
if: github.ref == 'refs/heads/master'
run: echo "yarn release"
env:
YARN_REGISTRY: https://registry.npmjs.org/
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} # Yarn doesn't seem to respect this
- run: echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" > ~/.npmrc
- name: Publish (GPR)
if: github.ref == 'refs/heads/master'
run: echo "yarn release"
env:
YARN_REGISTRY: https://npm.pkg.github.com/
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Yarn doesn't seem to respect this
- run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
- name: Publish (NPM) - canary
if: github.ref != 'refs/heads/master'
run: yarn release --canary
env:
YARN_REGISTRY: https://registry.npmjs.org/
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} # Yarn doesn't seem to respect this
- run: echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" > ~/.npmrc
- name: Publish (GPR) - canary
if: github.ref != 'refs/heads/master'
run: yarn release --canary
env:
YARN_REGISTRY: https://npm.pkg.github.com/
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Yarn doesn't seem to respect this