@@ -16,28 +16,18 @@ jobs:
16
16
- name : Setup Node.js for use with Actions
17
17
uses : actions/setup-node@v1
18
18
with :
19
- node-version : ' 12.14.1 '
19
+ node-version : ' 12.16.0 '
20
20
- name : Install Yarn
21
21
run : curl -o- -L https://yarnpkg.com/install.sh | bash
22
- - name : Get yarn cache
23
- id : yarn-cache
24
- run : echo "::set-output name=dir::$(yarn cache dir)"
25
- - name : Cache dependencies
26
- uses : actions/cache@v1
27
- with :
28
- path : ${{ steps.yarn-cache.outputs.dir }}
29
- key : ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
30
- restore-keys : |
31
- ${{ runner.os }}-yarn-
32
22
- name : Install dependencies with Yarn
33
23
run : yarn install
34
24
- name : Compile TypeScript
35
25
run : yarn run build
36
- - name : Upload compiled TypeScript
37
- uses : actions/upload-artifact@v1
26
+ - name : Upload compiler output
27
+ uses : actions/upload-artifact@master
38
28
with :
39
29
name : tsc_output
40
- path : tsc_output
30
+ path : ./ tsc_output
41
31
lint :
42
32
name : Lint
43
33
51
41
- name : Setup Node.js for use with Actions
52
42
uses : actions/setup-node@v1
53
43
with :
54
- node-version : ' 12.14.1 '
44
+ node-version : ' 12.16.0 '
55
45
- name : Install Yarn
56
46
run : curl -o- -L https://yarnpkg.com/install.sh | bash
57
- - name : Get yarn cache
58
- id : yarn-cache
59
- run : echo "::set-output name=dir::$(yarn cache dir)"
60
- - name : Cache dependencies
61
- uses : actions/cache@v1
62
- with :
63
- path : ${{ steps.yarn-cache.outputs.dir }}
64
- key : ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
65
- restore-keys : |
66
- ${{ runner.os }}-yarn-
67
47
- name : Install dependencies with Yarn
68
48
run : yarn install
69
49
- name : Lint with XO
@@ -81,20 +61,37 @@ jobs:
81
61
- name : Setup Node.js for use with Actions
82
62
uses : actions/setup-node@v1
83
63
with :
84
- node-version : ' 12.14.1 '
64
+ node-version : ' 12.16.0 '
85
65
- name : Install Yarn
86
66
run : curl -o- -L https://yarnpkg.com/install.sh | bash
87
- - name : Get yarn cache
88
- id : yarn-cache
89
- run : echo "::set-output name=dir::$(yarn cache dir)"
90
- - name : Cache dependencies
91
- uses : actions/cache@v1
92
- with :
93
- path : ${{ steps.yarn-cache.outputs.dir }}
94
- key : ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
95
- restore-keys : |
96
- ${{ runner.os }}-yarn-
97
67
- name : Install dependencies with Yarn
98
68
run : yarn install
99
69
- name : Check style with Prettier
100
70
run : yarn run style
71
+ publish :
72
+ name : Publish
73
+
74
+ runs-on : ubuntu-latest
75
+
76
+ needs : [lint, style]
77
+
78
+ steps :
79
+ - name : Checkout git repository
80
+ uses : actions/checkout@v1
81
+ with :
82
+ fetch-depth : 0
83
+ - name : Setup Node.js for use with Actions
84
+ uses : actions/setup-node@v1
85
+ with :
86
+ node-version : ' 12.16.0'
87
+ - name : Install Yarn
88
+ run : curl -o- -L https://yarnpkg.com/install.sh | bash
89
+ - name : Install dependencies with Yarn
90
+ run : yarn install
91
+ - name : Compile TypeScript for publishing
92
+ run : yarn run build --build tsconfig.build.json
93
+ - name : Run semantic release
94
+ run : yarn run semantic-release
95
+ env :
96
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
97
+ NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
0 commit comments