Skip to content

add more binaries

add more binaries #3

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
build:
strategy:
matrix:
include:
- os: ubuntu-latest
goos: linux
goarch: amd64
output: vcfanno_linux64
- os: ubuntu-latest
goos: linux
goarch: arm64
output: vcfanno_linux_aarch64
- os: macos-latest
goos: darwin
goarch: amd64
output: vcfanno_osx
- os: macos-latest
goos: darwin
goarch: arm64
output: vcfanno_osx_aarch64
- os: ubuntu-latest
goos: windows
goarch: amd64
output: vcfanno_windows64.exe
- os: ubuntu-latest
goos: windows
goarch: arm64
output: vcfanno_windows_aarch64.exe
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Build
env:
CGO_ENABLED: 0
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
run: go build -o ${{ matrix.output }} --ldflags '-extldflags "-static"' vcfanno.go
- name: Verify cgo is disabled
run: go version -m ${{ matrix.output }} | grep -q "CGO_ENABLED=0"
- name: Verify Linux static binary
if: matrix.goos == 'linux'
run: |
file ${{ matrix.output }}
ldd ${{ matrix.output }} 2>&1 | grep -q "not a dynamic executable"
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.output }}
path: ${{ matrix.output }}
release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
merge-multiple: true
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
files: artifacts/*
generate_release_notes: true