Skip to content

Commit 5de3f30

Browse files
authored
Merge pull request #3 from yapstudios/prebuilt-binary-releases
Add prebuilt binary releases
2 parents e1ec95e + 80ac7a4 commit 5de3f30

3 files changed

Lines changed: 44 additions & 4 deletions

File tree

.github/workflows/release.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "[0-9]+.*"
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
release:
13+
name: Build and Release
14+
runs-on: macos-15
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: Build universal binary
19+
run: swift build -c release --arch arm64 --arch x86_64
20+
21+
- name: Verify binary
22+
run: |
23+
.build/apple/Products/Release/zeplin-cli --version
24+
file .build/apple/Products/Release/zeplin-cli
25+
26+
- name: Package
27+
run: |
28+
cd .build/apple/Products/Release
29+
tar czf zeplin-cli-macos.tar.gz zeplin-cli
30+
shasum -a 256 zeplin-cli-macos.tar.gz
31+
32+
- name: Create release
33+
env:
34+
GH_TOKEN: ${{ github.token }}
35+
run: |
36+
SHA256=$(shasum -a 256 .build/apple/Products/Release/zeplin-cli-macos.tar.gz | awk '{print $1}')
37+
gh release create "${{ github.ref_name }}" \
38+
.build/apple/Products/Release/zeplin-cli-macos.tar.gz \
39+
--title "${{ github.ref_name }}" \
40+
--notes "SHA256: \`${SHA256}\`"

CLAUDE.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ Uses Swift Testing (`@Suite`, `@Test`, `#expect`, `#require`), not XCTest. Comma
2222

2323
## Releases
2424

25-
- **Never create GitHub releases.** Tag only.
26-
- Homebrew formula in `yapstudios/homebrew-tap` uses the tag tarball. Update URL and SHA256 when releasing.
27-
- Mint uses the git tag directly.
2825
- Update version in `Sources/ZeplinCLI/CLI.swift` and `CHANGELOG.md` before tagging.
26+
- Pushing a tag triggers `.github/workflows/release.yml`, which builds a universal binary and creates a GitHub Release with `zeplin-cli-macos.tar.gz` attached.
27+
- After the release, update the Homebrew formula in `yapstudios/homebrew-tap` with the new URL and SHA256 from the release notes.
28+
- Mint uses the git tag directly (no formula update needed).
2929

3030
## Dependencies
3131

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ To update later:
127127
brew update && brew upgrade zeplin-cli
128128
```
129129

130-
This builds from source and automatically installs shell completions for zsh, bash, and fish.
130+
This installs a prebuilt universal binary and shell completions for zsh, bash, and fish.
131131

132132
### Using Mint
133133

0 commit comments

Comments
 (0)