mirror of
https://github.com/Picocrypt/Picocrypt.git
synced 2025-05-12 21:58:31 +02:00
61 lines
1.3 KiB
YAML
61 lines
1.3 KiB
YAML
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 wget
|
|
|
|
- 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: Package as .app
|
|
run: |
|
|
wget -o Picocrypt.app.zip https://github.com/user-attachments/files/15934813/Picocrypt.app.zip
|
|
ls -l
|
|
mkdir Picocrypt.app
|
|
unzip -d Picocrypt.app Picocrypt.app.zip
|
|
rm Picocrypt.app.zip
|
|
mv src/Picocrypt Picocrypt.app/Contents/MacOS/Picocrypt
|
|
zip -r Picocrypt.app.zip Picocrypt.app
|
|
|
|
- name: Upload artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: build-macos
|
|
path: |
|
|
Picocrypt.app.zip
|
|
if-no-files-found: error
|
|
compression-level: 9
|