Skip to content

Add CGO_ENABLED to release process #65

Add CGO_ENABLED to release process

Add CGO_ENABLED to release process #65

name: Build, Test and Release
on:
pull_request:
types:
- closed
branches:
- main
permissions:
contents: write
packages: write
id-token: write
jobs:
code-check:
runs-on: ubuntu-latest
env:
CGO_ENABLED: 1
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '>=1.20.1'
cache: true
- name: Build
run: go build -v ./...
- name: Test (Unit Only)
run: go test -v ./... -short
- name: Bump version and push tag
uses: anothrNick/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WITH_V: true
DEFAULT_BUMP: patch
goreleaser:
needs: code-check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- run: git fetch --force --tags
- uses: actions/setup-go@v3
with:
go-version: '>=1.20.1'
cache: true
- uses: goreleaser/goreleaser-action@v4
with:
distribution: goreleaser
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
FURY_TOKEN: ${{ secrets.FURY_TOKEN }}