File tree Expand file tree Collapse file tree 1 file changed +63
-0
lines changed
Expand file tree Collapse file tree 1 file changed +63
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build with Semantic-Release
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+
8+ jobs :
9+ test :
10+ runs-on : ubuntu-latest
11+ strategy :
12+ matrix :
13+ node-version : [ 20.x, 22.x ]
14+
15+ steps :
16+ - name : Checkout code
17+ uses : actions/checkout@v4
18+ with :
19+ token : ${{ secrets.TOKEN_GITHUB }}
20+
21+ - name : Use Node.js ${{ matrix.node-version }}
22+ uses : actions/setup-node@v2
23+ with :
24+ node-version : ${{ matrix.node-version }}
25+
26+ - name : install dependencies
27+ run : npm ci
28+
29+ - name : Run tests
30+ run : npm run test
31+
32+ - name : Run e2e tests
33+ run : npm run test:e2e
34+
35+ release :
36+ runs-on : ubuntu-latest
37+ needs :
38+ - test
39+ steps :
40+ - name : checkout
41+ uses : actions/checkout@v4
42+ with :
43+ token : ${{ secrets.TOKEN_GITHUB }}
44+ persist-credentials : true
45+ fetch-depth : 0
46+
47+ - name : environment
48+ uses : actions/setup-node@v3
49+ with :
50+ cache : npm
51+ node-version : 20
52+
53+ - name : install dependencies
54+ run : npm ci
55+
56+ - name : build project
57+ run : npm run build
58+
59+ - name : Semantic Release
60+ env :
61+ GITHUB_TOKEN : ${{ secrets.TOKEN_GITHUB }}
62+ NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
63+ run : npx semantic-release
You can’t perform that action at this time.
0 commit comments