-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (48 loc) · 1.5 KB
/
release.yml
File metadata and controls
59 lines (48 loc) · 1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
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"