ci: add goreleaser #23
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: Test | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ "master", "dev" ] | |
pull_request: | |
branches: [ "master", "dev" ] | |
permissions: | |
contents: read | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.21' | |
- name: Set up deps | |
run: | | |
sudo apt-get install -y gcc flex bison make libelf-dev | |
- name: Build | |
run: make build | |
- name: Test | |
run: make test | |
releaser-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.21 | |
- name: Run GoReleaser | |
uses: goreleaser/goreleaser-action@v5 | |
with: | |
distribution: goreleaser | |
version: latest | |
args: release --snapshot --clean --skip=publish --verbose | |
env: | |
WORKDIR: ${{ github.workspace }} |