@@ -5,57 +5,58 @@ name: Build & Test Components
55
66on :
77 push :
8- branches : [ master ]
9- pull_request :
10- branches : [ master ]
8+ branches :
9+ - master
10+ paths :
11+ - " packages/**"
1112
1213jobs :
13- build :
14+ release :
15+ name : Release
1416 runs-on : ubuntu-latest
1517 strategy :
1618 matrix :
17- node-version : [ 12.x]
19+ node-version : 12.x
1820 steps :
19- - uses : actions/checkout@v2
21+ - name : Checkout Repo
22+ uses : actions/checkout@master
23+ with :
24+ # This makes Actions fetch all Git history
25+ # so that Changesets can generate changelogs with the correct commits
26+ fetch-depth : 0
27+
2028 - name : Use Node.js ${{ matrix.node-version }}
21- uses : actions/setup-node@v1
29+ uses : actions/setup-node@master
2230 with :
2331 node-version : ${{ matrix.node-version }}
24- - run : yarn
25- - run : yarn bootstrap
26- - run : yarn lint
27- - run : yarn build --if-present
28- - run : yarn test
32+
33+ - name : Install dependencies
34+ run : yarn
35+
36+ - name : Bootstrap
37+ run : yarn bootstrap
38+
39+ - name : Linting
40+ run : yarn lint
41+
42+ - name : Testing components
43+ run : yarn test
2944 env :
3045 CI : true
31- release :
32- name : Release
33- runs-on : ubuntu-latest
34- steps :
35- - name : Checkout Repo
36- uses : actions/checkout@v1
37- - name : Setup Node.js
38- uses : actions/setup-node@v1
39- with :
40- node-version : 12
41- - name : Install Dependencies
42- run : yarn
43- - name : Create Release Pull Request
44- uses : changesets/action@master
45- env :
46- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
47- publish-npm :
48- needs : build
49- runs-on : ubuntu-latest
50- steps :
51- - uses : actions/checkout@v1
52- - uses : actions/setup-node@v1
53- with :
54- node-version : 12
55- registry-url : https://registry.npmjs.org/
56- - run : yarn
57- - run : yarn build
58- - run : yarn publish-ci
59- env :
60- NPM_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
6146
47+ - name : Building packages
48+ run : yarn build --if-present
49+
50+ - name : Setup CI Git User
51+ run : |
52+ git config --global user.email "jbakebwa@gmail.com"
53+ git config --global user.name "codebender828"
54+
55+ - name : Publish packages
56+ uses : changesets/action@master
57+ with :
58+ publish : yarn release
59+ commit : " chore(release): version packages"
60+ env :
61+ NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
62+ GITHUB_TOKEN : ${{secrets.GITHUB_TOKEN}}
0 commit comments