Mining/.github/workflows/release.yml
google-labs-jules[bot] 0fb239a239 feat(ci): add pre-release testing and codecov
- Adds a `test-release` target to the `Makefile` to run tests and cross-compile the binaries for all platforms.
- Updates the `release.yml` workflow to use the new `test-release` target before the `GoReleaser` action.
- Adds a step to the `release.yml` workflow to upload the coverage report to Codecov.
- Reorganizes the badges in the `README.md` file.
2025-11-09 23:05:47 +00:00

58 lines
1.2 KiB
YAML

name: Release
on:
push:
tags:
- 'v*.*.*'
permissions:
contents: write
packages: write
issues: write
id-token: write
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: stable
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
# - name: Build UI
# run: |
# cd ui
# npm install
# npm run build
- name: Run pre-release tests
run: make test-release
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DISCORD_WEBHOOK_ID: ${{ secrets.DISCORD_WEBHOOK_ID }}
DISCORD_WEBHOOK_TOKEN: ${{ secrets.DISCORD_WEBHOOK_TOKEN }}