-
-
Notifications
You must be signed in to change notification settings - Fork 1
75 lines (62 loc) · 1.69 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: publish
on:
push:
branches-ignore:
- '*'
tags:
- '*'
defaults:
run:
shell: bash
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
jobs:
build:
name: ${{ matrix.os }} ${{ matrix.target }}
runs-on: ${{ matrix.os }}
timeout-minutes: 120
strategy:
matrix:
os: [ubuntu-latest]
target: [16.x]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup node@${{ matrix.target }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.target }}
registry-url: 'https://registry.npmjs.org'
- name: List versions
run: |
node -v && npm -v && which npm
- name: Install dependencies
run: |
npm ci
- name: Publish to npm (Prerelease)
if: contains(github.ref, '-') == true
run: |
npm config list
npm publish . --tag=next
- name: Publish to npm
if: contains(github.ref, '-') == false
run: |
npm config list
npm publish .
# See https://github.com/actions/setup-node/issues/73.
# - name: Setup node@${{ matrix.target }}
# uses: actions/setup-node@v1
# with:
# node-version: ${{ matrix.target }}
# registry-url: 'https://npm.pkg.github.com/'
# scope: '@motss'
# - name: Publish to GPR (RC)
# if: success() && contains(github.ref, '-rc') == true
# run: |
# npm config list
# npm publish . --tag=next
# - name: Publish to GPR
# if: success() && contains(github.ref, '-rc') == false
# run: |
# npm config list
# npm publish .