workflow... #3
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
tags: | |
- 'v*' | |
permissions: | |
contents: write | |
jobs: | |
build: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '>=1.19.0' | |
- name: Install pandoc | |
run: brew install pandoc | |
- name: Build Intel | |
run: | | |
export CGO_ENABLED=1 | |
GOOS=darwin GOARCH=amd64 go build -o md2cb-darwin-amd64 | |
- name: Build Apple Silicon | |
run: | | |
export CGO_ENABLED=1 | |
GOOS=darwin GOARCH=arm64 go build -o md2cb-darwin-arm64 | |
- name: Create Universal Binary | |
run: | | |
lipo -create -output md2cb-darwin-universal \ | |
md2cb-darwin-amd64 \ | |
md2cb-darwin-arm64 | |
- name: Release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
gh release create ${{ github.ref_name }} \ | |
--title "Release ${{ github.ref_name }}" \ | |
--notes "macOS binaries for md2cb | |
Requirements: | |
- macOS | |
- pandoc (\`brew install pandoc\`) | |
Available versions: | |
- Universal Binary (works on both Intel and Apple Silicon) | |
- Intel Mac (x86_64) specific binary | |
- Apple Silicon (ARM64) specific binary" \ | |
md2cb-darwin-universal#"md2cb-darwin-universal" \ | |
md2cb-darwin-amd64#"md2cb-darwin-amd64" \ | |
md2cb-darwin-arm64#"md2cb-darwin-arm64" |