@@ -2,12 +2,10 @@ name: Release
2
2
3
3
on :
4
4
push :
5
- branches : [master, beta ]
5
+ branches : [develop ]
6
6
7
7
jobs :
8
- release :
9
- name : Release
10
-
8
+ build :
11
9
runs-on : ubuntu-latest
12
10
timeout-minutes : 15
13
11
20
18
uses : actions/checkout@v2
21
19
with :
22
20
fetch-depth : 0
23
-
24
21
- name : Cache NPM
25
22
uses : actions/cache@v2
26
23
env :
@@ -30,13 +27,11 @@ jobs:
30
27
key : ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn-lock.json') }}
31
28
restore-keys : |
32
29
${{ runner.os }}-build-${{ env.cache-name }}-
33
-
34
30
- name : Setup Node.js ${{ matrix.node-version }}
35
31
uses : actions/setup-node@v1
36
32
with :
37
33
node-version : ${{ matrix.node-version }}
38
34
registry-url : ' https://npm.pkg.github.com'
39
-
40
35
- name : Install dependencies
41
36
run :
42
37
yarn install |
@@ -49,17 +44,55 @@ jobs:
49
44
run : yarn run start-and-run-tests
50
45
env :
51
46
NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
52
-
53
47
- name : Run linting
54
48
run : yarn lint
55
49
env :
56
50
NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
57
-
51
+ - name : Bump version
52
+ run : yarn run version
53
+ env :
54
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
58
55
- name : Build project
59
56
run : yarn build
60
57
61
- - name : Release
62
- run : yarn release
58
+ release-npm :
59
+ needs : build
60
+ name : Release npm
61
+ runs-on : ubuntu-latest
62
+ steps :
63
+ - uses : actions/checkout@v1
64
+ - uses : actions/setup-node@v1
65
+ with :
66
+ node-version : ${{ matrix.node-version }}
67
+ registry-url : https://registry.npmjs.org/
68
+ - run : yarn install --frozen-lockfile
69
+ - run : npm publish --tag beta --access public
70
+ env :
71
+ NODE_AUTH_TOKEN : ${{ secrets.NPMJS_TOKEN }}
72
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
73
+ NPM_TOKEN : ${{ secrets.NPMJS_TOKEN }}
74
+ GIT_COMMIT : ${{ github.sha }}
75
+ GIT_AUTHOR_NAME : ${{ secrets.GIT_AUTHOR_NAME }}
76
+ GIT_AUTHOR_EMAIL : ${{ secrets.GIT_AUTHOR_EMAIL }}
77
+ GIT_COMMITTER_NAME : ${{ secrets.GIT_COMMITTER_NAME }}
78
+ GIT_COMMITTER_EMAIL : ${{ secrets.GIT_COMMITTER_EMAIL }}
79
+
80
+ release-gpr :
81
+ needs : build
82
+ name : Release gpr
83
+ runs-on : ubuntu-latest
84
+ steps :
85
+ - uses : actions/checkout@v1
86
+ - uses : actions/setup-node@v1
87
+ with :
88
+ node-version : ${{ matrix.node-version }}
89
+ registry-url : https://npm.pkg.github.com/
90
+ scope : ' @lottiefiles'
91
+ - run : yarn install --frozen-lockfile
92
+ - run :
93
+ echo "//npm.pkg.github.com:_authToken=${{ secrets.GITHUB_TOKEN }}" >
94
+ ~/.npmrc
95
+ - run : npm publish --tag beta --@lottiefiles:registry=https://npm.pkg.github.com/
63
96
env :
64
97
NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
65
98
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments