Create build-windows.yml

First attempt at building via GH Actions
This commit is contained in:
Evan Su 2024-06-17 22:19:38 -04:00 committed by GitHub
parent 8d44ffddd6
commit d4759702b9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

33
.github/workflows/build-windows.yml vendored Normal file
View file

@ -0,0 +1,33 @@
name: build-windows
on:
push:
paths:
- "src/*.go"
- "src/go.mod"
- "src/go.sum"
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup
uses: actions/setup-go@v5
with:
go-version: '>=1.22'
check-latest: true
- name: Build
run: go build -ldflags="-s -w -H=windowsgui -extldflags=-static" -o Picocrypt.exe src/Picocrypt.go
env:
CGO_ENABLED: 1
- name: Upload
uses: actions/upload-artifact@v4
with:
name: build-windows
path: Picocrypt.exe
if-no-files-found: error
compression-level: 9