|
8 | 8 | build: |
9 | 9 | runs-on: ubuntu-latest |
10 | 10 | steps: |
11 | | - - uses: actions/checkout@v2 |
12 | | - - uses: actions/setup-ruby@v1 |
13 | | - with: |
14 | | - ruby-version: '2.5' |
15 | | - - uses: actions/setup-go@v2 |
16 | | - with: |
17 | | - go-version: 1.14 |
| 11 | + - name: Checkout repository |
| 12 | + uses: actions/checkout@v4 |
18 | 13 |
|
19 | | - - name: Run tests |
20 | | - if: matrix.os == 'windows-latest' |
21 | | - run: go test -race ./... |
| 14 | + - name: Install Go |
| 15 | + uses: actions/setup-go@v5 |
| 16 | + with: |
| 17 | + go-version: 1.23.x |
22 | 18 |
|
23 | | - - name: Build and publish |
24 | | - run: rake build |
| 19 | + - name: Check version |
| 20 | + run: go version |
25 | 21 |
|
26 | | - # - name: Archive action artifacts |
27 | | - # uses: actions/upload-artifact@v2 |
28 | | - # with: |
29 | | - # name: artifacts |
30 | | - # path: build/artifacts/* |
| 22 | + - name: Test and build |
| 23 | + run: rake build |
31 | 24 |
|
32 | | - - name: Upload artifacts to release |
33 | | - if: ${{ startsWith(github.ref, 'refs/tags/v') }} |
34 | | - uses: ncipollo/release-action@v1 |
35 | | - with: |
36 | | - artifacts: "build/artifacts/*" |
37 | | - bodyFile: "build/release_notes" |
38 | | - token: ${{ secrets.GITHUB_TOKEN }} |
| 25 | + - name: Upload coverage |
| 26 | + uses: codecov/codecov-action@v4 |
| 27 | + with: |
| 28 | + token: ${{ secrets.CODECOV_TOKEN }} |
| 29 | + verbose: true |
| 30 | + flags: unittests |
| 31 | + file: build/go-test-coverage.txt |
| 32 | + |
| 33 | + - name: Archive build artifacts |
| 34 | + if: ${{ !cancelled() }} |
| 35 | + uses: actions/upload-artifact@v4 |
| 36 | + with: |
| 37 | + name: ${{ github.event.repository.name }}-${{env.VERSION}} |
| 38 | + path: | |
| 39 | + build/release_notes.md |
| 40 | + build/artifacts/* |
| 41 | +
|
| 42 | + - name: Upload artifacts to release |
| 43 | + if: ${{ startsWith(github.ref, 'refs/tags/v') }} |
| 44 | + uses: ncipollo/release-action@v1 |
| 45 | + with: |
| 46 | + artifacts: "build/artifacts/*" |
| 47 | + bodyFile: "build/release_notes" |
| 48 | + token: ${{ secrets.GITHUB_TOKEN }} |
0 commit comments