Skip to content

Commit 55a21a8

Browse files
committed
ci: Add release.yml to pre-compile for arm64/x86_64
1 parent a488ce5 commit 55a21a8

2 files changed

Lines changed: 77 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
build-x86_64:
10+
runs-on: macos-13 # Intel runner
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- name: Build (x86_64)
15+
run: |
16+
swift build -c release --disable-sandbox --arch x86_64
17+
18+
- name: Package (x86_64)
19+
run: |
20+
tar -czf macime-${{ github.ref_name }}-x86_64.tar.gz \
21+
-C .build/x86_64-apple-macosx/release macime macimed
22+
23+
- uses: actions/upload-artifact@v4
24+
with:
25+
name: x86_64
26+
path: macime-${{ github.ref_name }}-x86_64.tar.gz
27+
28+
build-arm64:
29+
runs-on: macos-latest # Apple Silicon runner (M1/M2)
30+
steps:
31+
- uses: actions/checkout@v4
32+
33+
- name: Build (arm64)
34+
run: |
35+
swift build -c release --disable-sandbox --arch arm64
36+
37+
- name: Package (arm64)
38+
run: |
39+
tar -czf macime-${{ github.ref_name }}-arm64.tar.gz \
40+
-C .build/arm64-apple-macosx/release macime macimed
41+
42+
- uses: actions/upload-artifact@v4
43+
with:
44+
name: arm64
45+
path: macime-${{ github.ref_name }}-arm64.tar.gz
46+
47+
release:
48+
needs: [build-x86_64, build-arm64]
49+
runs-on: macos-latest
50+
permissions:
51+
contents: write
52+
steps:
53+
- uses: actions/download-artifact@v4
54+
with:
55+
name: x86_64
56+
57+
- uses: actions/download-artifact@v4
58+
with:
59+
name: arm64
60+
61+
- name: Compute SHA256
62+
run: |
63+
echo "SHA256_X86=$(shasum -a 256 macime-${{ github.ref_name }}-x86_64.tar.gz | awk '{print $1}')" >> $GITHUB_ENV
64+
echo "SHA256_ARM=$(shasum -a 256 macime-${{ github.ref_name }}-arm64.tar.gz | awk '{print $1}')" >> $GITHUB_ENV
65+
66+
- name: Create GitHub Release
67+
uses: softprops/action-gh-release@v2
68+
with:
69+
files: |
70+
macime-${{ github.ref_name }}-x86_64.tar.gz
71+
macime-${{ github.ref_name }}-arm64.tar.gz
72+
73+
- name: Show SHA256 (for formula update)
74+
run: |
75+
echo "x86_64: $SHA256_X86"
76+
echo "arm64 : $SHA256_ARM"

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## [4.3.1](https://github.com/riodelphino/macime/compare/v4.3.0...v4.3.1) (2026-04-13)
44

5+
* **ci:** Add `release.yml` to pre-compile for arm64/x86_64
56
* **ci:** Rename `ci.yml` to `test.yml`
67
* **docs:** Move `Unstable Switching Issue` to Github issue and link it
78

0 commit comments

Comments
 (0)