Create build-macos.yml

This commit is contained in:
Evan Su 2024-06-21 00:00:48 -04:00 committed by GitHub
parent d94c3532a0
commit 73c53456ce
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

51
.github/workflows/build-macos.yml vendored Normal file
View file

@ -0,0 +1,51 @@
name: build-macos
on:
push:
paths:
- "src/*.go"
- "src/go.mod"
- "src/go.sum"
branches:
- main
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
jobs:
build:
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '>1.18'
check-latest: true
cache: false
- name: Install packages
run: |
brew install glfw glew
- name: Install dependencies
run: |
cd src
go mod download
- name: Build
run: |
cd src
go build -v -ldflags="-s -w" -o Picocrypt Picocrypt.go
env:
CGO_ENABLED: 1
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: build-macos
path: |
src/Picocrypt
if-no-files-found: error
compression-level: 9