Skip to content

CI: disable CGO_ENABLED on cross build (release) #8

CI: disable CGO_ENABLED on cross build (release)

CI: disable CGO_ENABLED on cross build (release) #8

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*.*.*'
jobs:
release:
runs-on: ubuntu-22.04
steps:
- name: Set up Go 1.21
uses: actions/setup-go@v3
with:
go-version: 1.21
check-latest: true
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Cross build
env:
CGO_ENABLED: 0
run: |
GOOS=linux GOARCH=386 make -e buildx
GOOS=linux GOARCH=amd64 make -e buildx
GOOS=linux GOARCH=arm GOARM=5 make -e buildx
GOOS=linux GOARCH=arm GOARM=6 make -e buildx
GOOS=linux GOARCH=arm GOARM=7 make -e buildx
GOOS=linux GOARCH=arm64 make -e buildx
GOOS=darwin GOARCH=amd64 make -e buildx
GOOS=darwin GOARCH=arm64 make -e buildx
GOOS=freebsd GOARCH=amd64 make -e buildx
GOOS=openbsd GOARCH=amd64 make -e buildx
GOOS=netbsd GOARCH=amd64 make -e buildx
- name: Create Release
uses: actions/[email protected]
id: create_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: Upload Release Assets
uses: glentiki/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
assets_path: ./build