@@ -2,30 +2,41 @@ name: Release
2
2
3
3
on :
4
4
push :
5
- branches : [alpha]
5
+ branches : [ alpha ]
6
6
7
7
jobs :
8
8
release :
9
- name : Release
10
9
runs-on : ubuntu-latest
11
-
10
+ strategy :
11
+ matrix :
12
+ node : [ '12', '13', '14' ]
13
+ name : Release with Node version ${{ matrix.node }}
12
14
steps :
13
- - name : Checkout
14
- uses : actions/checkout@v2
15
- - name : Setup Node.js
16
- uses : actions/setup-node@v1
17
- with :
18
- node-version : 12.x
19
- - name : Replace Git URL from SSH to https
20
- run : git config --global url."https://${{ secrets.ACCESS }}@github.com/".insteadOf ssh://git@github.com/
21
- - name : Install dependencies
22
- run : npx ci
23
- - name : Install semantic-release extra plugins
24
- run : npm install -D @semantic-release/changelog @semantic-release/git
25
- - name : Build
26
- run : npm run build
27
- - name : Release
28
- env :
29
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
30
- NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
31
- run : npx semantic-release
15
+ - name : Checkout CLI
16
+ uses : actions/checkout@v2
17
+ with :
18
+ repository : apimatic/apimatic-cli
19
+ token : ${{ secrets.ACCESS_TOKEN }}
20
+ persist-credentials : false
21
+ fetch-depth : 0
22
+ path : cli
23
+
24
+ - name : setup node
25
+ uses : actions/setup-node@v2
26
+
27
+ - name : Install dependencies
28
+ working-directory : cli
29
+ run : |
30
+ git config --global url."https://${{ secrets.ACCESS_TOKEN }}@github.com/".insteadOf https://github.com/
31
+ npm install
32
+ npm install --save-dev @semantic-release/changelog @semantic-release/git
33
+ - name : Check Build
34
+ working-directory : ' cli'
35
+ run : npm run build
36
+
37
+ - name : Release
38
+ working-directory : cli
39
+ env :
40
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
41
+ NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
42
+ run : npx semantic-release
0 commit comments