-
-
Notifications
You must be signed in to change notification settings - Fork 46.9k
76 lines (59 loc) · 1.48 KB
/
publish-to-github-package.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
76
name: Publish to github-package
on:
release:
types: [published]
jobs:
compile:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@master
- uses: actions/setup-node@v1
with:
node-version: '12.x'
registry-url: 'https://registry.npmjs.org'
- name: install
run: npm install
- name: compile
run: npm run compile
- name: dist
run: npm run dist
- uses: actions/upload-artifact@master
with:
name: esm
path: es
- uses: actions/upload-artifact@master
with:
name: cjs
path: lib
- uses: actions/upload-artifact@master
with:
name: dist
path: dist
- uses: actions/upload-artifact@master
with:
name: package
path: package.json
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@master
with:
name: esm
- uses: actions/download-artifact@master
with:
name: cjs
- uses: actions/download-artifact@master
with:
name: dist
- uses: actions/download-artifact@master
with:
name: package
- uses: actions/setup-node@v1
with:
node-version: '12.x'
registry-url: 'https://npm.pkg.github.com'
- name: publish
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}