diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 2ca8cf6..2735258 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -36,14 +36,6 @@ jobs: - name: Test and build run: rake build - # - name: Run tests with coverage - # if: matrix.os != 'windows-latest' - # run: go test -race -coverprofile=coverage.txt -covermode=atomic ./... - - # - name: Run tests without coverage (windows) - # if: matrix.os == 'windows-latest' - # run: go test -race ./... - - name: Upload coverage if: matrix.os != 'windows-latest' uses: codecov/codecov-action@v4 diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index ed9e9d3..564c7d2 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -8,31 +8,41 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-ruby@v1 - with: - ruby-version: '2.5' - - uses: actions/setup-go@v2 - with: - go-version: 1.14 + - name: Checkout repository + uses: actions/checkout@v4 - - name: Run tests - if: matrix.os == 'windows-latest' - run: go test -race ./... + - name: Install Go + uses: actions/setup-go@v5 + with: + go-version: 1.23.x - - name: Build and publish - run: rake build + - name: Check version + run: go version - # - name: Archive action artifacts - # uses: actions/upload-artifact@v2 - # with: - # name: artifacts - # path: build/artifacts/* + - name: Test and build + run: rake build - - name: Upload artifacts to release - if: ${{ startsWith(github.ref, 'refs/tags/v') }} - uses: ncipollo/release-action@v1 - with: - artifacts: "build/artifacts/*" - bodyFile: "build/release_notes" - token: ${{ secrets.GITHUB_TOKEN }} + - name: Upload coverage + uses: codecov/codecov-action@v4 + with: + token: ${{ secrets.CODECOV_TOKEN }} + verbose: true + flags: unittests + file: build/go-test-coverage.txt + + - name: Archive build artifacts + if: ${{ !cancelled() }} + uses: actions/upload-artifact@v4 + with: + name: ${{ github.event.repository.name }}-${{env.VERSION}} + path: | + build/release_notes.md + build/artifacts/* + + - name: Upload artifacts to release + if: ${{ startsWith(github.ref, 'refs/tags/v') }} + uses: ncipollo/release-action@v1 + with: + artifacts: "build/artifacts/*" + bodyFile: "build/release_notes" + token: ${{ secrets.GITHUB_TOKEN }}