Skip to content

windows build

windows build #22

Workflow file for this run

on:
push:
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- arch: amd64
os: linux
- arch: arm64
os: linux
- arch: arm64
os: darwin
- arch: amd64
os: windows
ext: .exe
env:
BINARY_NAME: ${{ github.repository }}-${{ matrix.os }}-${{ matrix.arch }}${{ matrix.ext }}
GOARCH: ${{ matrix.arch }}
GOOS: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: './go.mod'
- run: go build -o "$BINARY_NAME" -v -ldflags '-X main.Version=${{ github.ref_name }}'
- run: gh release upload ${{ github.ref_name }} "$BINARY_NAME"
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
release:
needs: [build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: gh release edit ${{ github.ref_name }} --prerelease=false --latest
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}