Skip to content

win-build

win-build #3

Workflow file for this run

name: win-build
on:
workflow_dispatch:
jobs:
build:
runs-on: windows-latest
steps:
- name: checkout
uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: '^1.23'
- name: env vars
run: |
setx CGO_ENABLED 0
setx GOOS windows
setx GOARCH amd64
- name: build
run: go build -ldflags="-s -w" -o build/nexus2_win -v .
- name: Install UPX
uses: crazy-max/ghaction-upx@v3
with:
install-only: true
- name: compress binary
run: upx build/nexus2_win
- name: upload binaries
uses: actions/upload-artifact@v4
with:
name: win_amd64
path: build/nexus2_win