feat: force first release #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- '**.go' | |
- 'go.mod' | |
- 'go.sum' | |
jobs: | |
test: | |
name: test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.22.1' | |
- name: test | |
run: go test -v ./... | |
release: | |
needs: test | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
issues: write | |
pull-requests: write | |
discussions: write | |
packages: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.22.1' | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20' | |
- name: Build Binaries | |
run: | | |
mkdir -p release | |
GOOS=linux GOARCH=amd64 go build -o release/evm-exporter-linux-amd64 | |
GOOS=darwin GOARCH=amd64 go build -o release/evm-exporter-darwin-amd64 | |
GOOS=darwin GOARCH=arm64 go build -o release/evm-exporter-darwin-arm64 | |
GOOS=windows GOARCH=amd64 go build -o release/evm-exporter-windows-amd64.exe | |
- name: Install semantic-release | |
run: npm install @semantic-release/git @semantic-release/changelog @semantic-release/exec conventional-changelog-conventionalcommits | |
- name: Release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: npx semantic-release -e ./.github/release.config.js |