File tree 3 files changed +47
-32
lines changed
3 files changed +47
-32
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ name : Main
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - master
7
+ jobs :
8
+ install-build-and-test :
9
+ runs-on : ubuntu-latest
10
+
11
+ steps :
12
+ - uses : actions/checkout@v1
13
+ - name : Install dependencies
14
+ run : |
15
+ npm install
16
+ npm install react
17
+ - name : Build package
18
+ run : npm run build
19
+ - name : Run tests
20
+ run : npm run test
21
+ - name : Prepare new release
22
+ run : |
23
+ git config --global user.email "[email protected] "
24
+ git config --global user.name "GitHub Actions"
25
+ git remote set-url origin https://github.com/cchanxzy:${GITHUB_TOKEN}/React-Currency-Input-Field.git
26
+ npm run release
27
+ git push --follow-tags origin HEAD
28
+ env:
29
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30
+ release :
31
+ needs : install-build-and-test
32
+ runs-on : ubuntu-latest
33
+ steps :
34
+ - uses : actions/checkout@v1
35
+ - uses : actions/setup-node@v1
36
+ with :
37
+ node-version : 12
38
+ registry-url : https://registry.npmjs.org/
39
+ - name : Publish to NPM
40
+ run : npm publish
41
+ env :
42
+ NODE_AUTH_TOKEN : ${{secrets.NPM_TOKEN}}
Original file line number Diff line number Diff line change @@ -3,16 +3,16 @@ name: PR
3
3
on : [pull_request]
4
4
5
5
jobs :
6
- build :
6
+ install- build-and-test :
7
7
runs-on : ubuntu-latest
8
8
9
9
steps :
10
10
- uses : actions/checkout@v1
11
- - name : Dependencies
11
+ - name : Install dependencies
12
12
run : |
13
13
npm install
14
14
npm install react
15
- - name : Test
16
- run : npm run test
17
- - name : Build
15
+ - name : Build package
18
16
run : npm run build
17
+ - name : Run tests
18
+ run : npm run test
You can’t perform that action at this time.
0 commit comments