Skip to content

Build for macOS

Build for macOS #3

Workflow file for this run

name: MacOS Build
on:
workflow_dispatch: # Only enable manual runs for now
jobs:
build:
runs-on: macos-latest
steps:
# Checkout the repository
- name: Checkout Repository
uses: actions/checkout@v4
# Set up Go
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.23
# Install dependencies and run the tests
- name: Install Dependencies
run: |
brew install make
make format
make test
continue-on-error: false
# Build the application
- name: Build for MacOS
run: |
mkdir -p bin
GOARCH=amd64 go build -o bin/gogg-x86_64 ./...
GOARCH=arm64 go build -o bin/gogg-arm64 ./...
lipo -create -output bin/gogg bin/gogg-x86_64 bin/gogg-arm64
continue-on-error: false
# Debug: List Build Directory
- name: List Build Directory
run: ls -R bin
# Archive the build artifacts
- name: Archive Build Artifacts
uses: actions/upload-artifact@v4
with:
name: gogg-osx-universal
path: 'bin/gogg'