Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Build for macOS ARM64

on:
push:
tags: ['*']
create:
tags: ['*']

jobs:
build-mac-arm:
name: Build macOS ARM64 Binary
runs-on: macos-latest
if: startsWith(github.ref, 'refs/tags/')

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.20'

- name: Create bin directory
run: mkdir -p bin

- name: Build for macOS ARM64
run: |
echo "Building macOS ARM64 binary..."
GOOS=darwin GOARCH=arm64 go build -o bin/mailhog-mac-arm64 main.go

- name: Upload Build Artifact
uses: actions/upload-artifact@v4
with:
name: mailhog-mac-arm64
path: bin/mailhog-mac-arm64
retention-days: 5
if-no-files-found: error
compression-level: 6