File tree Expand file tree Collapse file tree 2 files changed +71
-24
lines changed
Expand file tree Collapse file tree 2 files changed +71
-24
lines changed Original file line number Diff line number Diff line change 1+ name : Example Rollup React Component NPM Package
2+
3+ on :
4+ release :
5+ types : [published]
6+ push :
7+ branches :
8+ - master
9+ pull_request :
10+ schedule :
11+ - cron : ' 0 12 * * *'
12+
13+ jobs :
14+ build :
15+ name : Test & Build
16+ runs-on : ${{ matrix.os }}
17+ strategy :
18+ matrix :
19+ os : [ubuntu-latest, macos-latest]
20+ node : [10, 12, 14]
21+ steps :
22+ - uses : actions/checkout@v2
23+ with :
24+ ref : ${{ github.ref }}
25+ - name : Setup Node
26+ uses : actions/setup-node@v1
27+ with :
28+ node-version : ${{ matrix.node }}
29+ - name : Cache dependencies
30+ uses : actions/cache@v2
31+ with :
32+ path : ~/.npm
33+ key : ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }}
34+ restore-keys : |
35+ ${{ runner.OS }}-node-
36+ ${{ runner.OS }}-
37+ - name : Install dependencies
38+ run : npm ci
39+ - name : Run Linting
40+ run : npm run lint
41+ - name : Run tests
42+ run : npm run test
43+ - name : Run Build
44+ run : npm run build
45+ - name : Check That Build Is ES5 Compatible
46+ run : npm run is-build-es5
47+ release :
48+ name : Release
49+ runs-on : ubuntu-latest
50+ if : ${{ github.ref == 'master' }}
51+ needs : build
52+ steps :
53+ - uses : actions/checkout@v2
54+ with :
55+ ref : ${{ github.ref }}
56+ - name : Setup Node
57+ uses : actions/setup-node@v1
58+ with :
59+ node-version : ${{ matrix.node }}
60+ - name : Install dependencies
61+ run : npm ci
62+ - name : Run Build
63+ run : npm run build
64+ - name : Semantic Release
65+ uses : cycjimmy/semantic-release-action@v2
66+ with :
67+ semantic_version : 16
68+ env :
69+ GITHUB_TOKEN : ${{ secrets.GH_TOKEN }}
70+ NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
71+
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments