|
1 | | -name: Semantic Release |
2 | | -on: |
3 | | - push: |
4 | | - branches: |
5 | | - - 'main' |
| 1 | +name: Build |
| 2 | +on: [push] |
| 3 | + |
| 4 | +env: |
| 5 | + CI_BUILD_NUM: ${{ github.run_id }} |
| 6 | + CI_BRANCH: ${{ github.ref_name }} |
| 7 | + CIRCLE_REPOSITORY_URL: dummy-url |
6 | 8 |
|
7 | 9 | jobs: |
8 | 10 | build: |
| 11 | + name: Test |
9 | 12 | runs-on: ubuntu-latest |
10 | | - if: "!contains(github.event.head_commit.message, '[skip ci]')" |
11 | 13 | steps: |
12 | | - - uses: actions/checkout@v3 |
13 | | - - name: Use Node.js 14.x |
14 | | - uses: actions/setup-node@v3 |
| 14 | + - uses: actions/checkout@v4 |
| 15 | + - name: Use Node.js 20.x |
| 16 | + uses: actions/setup-node@v4 |
15 | 17 | with: |
16 | | - node-version: '14.x' |
| 18 | + node-version: '20.x' |
17 | 19 | - run: npm install |
18 | 20 | - run: git config --global user.email "test@project-helix.io" && git config --global user.name "Test Build" |
19 | 21 | - run: npm test |
20 | | - env: |
21 | | - CIRCLE_REPOSITORY_URL: dummy-url |
| 22 | + - uses: codecov/codecov-action@v4 |
| 23 | + with: |
| 24 | + token: ${{ secrets.CODECOV_TOKEN }} |
22 | 25 |
|
23 | 26 | build_win: |
| 27 | + name: Test (Windows) |
24 | 28 | runs-on: windows-latest |
25 | | - if: "!contains(github.event.head_commit.message, '[skip ci]')" |
26 | 29 | steps: |
27 | 30 | - run: git config --global core.autocrlf false |
28 | | - - uses: actions/checkout@v3 |
29 | | - - name: Use Node.js 14.x |
30 | | - uses: actions/setup-node@v3 |
| 31 | + - uses: actions/checkout@v4 |
| 32 | + - name: Use Node.js 20.x |
| 33 | + uses: actions/setup-node@v4 |
31 | 34 | with: |
32 | | - node-version: '14.x' |
| 35 | + node-version: '20.x' |
33 | 36 | - run: npm install |
34 | 37 | - run: git config --global user.email "test@project-helix.io" && git config --global user.name "Test Build" |
35 | 38 | - run: npm test |
36 | | - env: |
37 | | - CIRCLE_REPOSITORY_URL: dummy-url |
38 | 39 |
|
39 | 40 | release: |
| 41 | + name: Release |
40 | 42 | runs-on: ubuntu-latest |
| 43 | + if: github.ref == 'refs/heads/main' |
41 | 44 | needs: [build, build_win] |
42 | | - if: "!contains(github.event.head_commit.message, '[skip ci]')" |
43 | 45 | steps: |
44 | | - - uses: actions/checkout@v3 |
| 46 | + - uses: actions/checkout@v4 |
45 | 47 | with: |
46 | 48 | persist-credentials: false |
47 | | - - name: Use Node.js 14.x |
48 | | - uses: actions/setup-node@v3 |
| 49 | + - name: Use Node.js 20.x |
| 50 | + uses: actions/setup-node@v4 |
49 | 51 | with: |
50 | | - node-version: '14.x' |
| 52 | + node-version: '20.x' |
51 | 53 | - run: npm install |
52 | 54 | - run: npm run semantic-release |
53 | 55 | env: |
|
0 commit comments