Skip to content

refactor: move argument check to main #77

refactor: move argument check to main

refactor: move argument check to main #77

Workflow file for this run

name: Build
on: push
permissions:
contents: write
jobs:
build:
name: Build and test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21'
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
- name: Lint
uses: golangci/golangci-lint-action@v3
with:
version: latest
- name: Check generate
run: make check-gen
- name: Build
run: make build
- name: Test
run: make test
release:
name: Release
runs-on: ubuntu-22.04
needs: [build]
if: startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Trim CHANGELOG.md
run: sed -e '0,/^##[^#]/d' -e '/^##[^#]/,$d' -i CHANGELOG.md
- name: Publish Github release
uses: softprops/action-gh-release@v1
with:
prerelease: true
body_path: CHANGELOG.md
releases-matrix:
name: Build binaries for release
runs-on: ubuntu-latest
needs: [release]
strategy:
matrix:
goos: [linux, darwin, windows]
goarch: [amd64, arm64]
exclude:
- goarch: arm64
goos: windows
steps:
- uses: actions/checkout@v4
- uses: wangyoucao577/go-release-action@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
extra_files: CHANGELOG.md LICENSE README.md