Skip to content

Commit 4399a85

Browse files
Add GitHub Actions for CI and releases
- CI workflow: builds on push/PR to main - Release workflow: creates universal binary on tag push Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 661fb30 commit 4399a85

2 files changed

Lines changed: 66 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
build:
11+
name: Build
12+
runs-on: macos-14
13+
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
18+
- name: Setup Swift
19+
uses: swift-actions/setup-swift@v2
20+
with:
21+
swift-version: '5.9'
22+
23+
- name: Build
24+
run: swift build
25+
26+
- name: Build Release
27+
run: swift build -c release

.github/workflows/release.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
build:
10+
name: Build macOS Binary
11+
runs-on: macos-14
12+
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
17+
- name: Setup Swift
18+
uses: swift-actions/setup-swift@v2
19+
with:
20+
swift-version: '5.9'
21+
22+
- name: Build Release Binary
23+
run: swift build -c release --arch arm64 --arch x86_64
24+
25+
- name: Package Binary
26+
run: |
27+
mkdir -p release
28+
cp .build/apple/Products/Release/xcode-theme-generator release/
29+
cd release
30+
tar -czvf xcode-theme-generator-macos.tar.gz xcode-theme-generator
31+
cd ..
32+
33+
- name: Create Release
34+
uses: softprops/action-gh-release@v1
35+
with:
36+
files: release/xcode-theme-generator-macos.tar.gz
37+
generate_release_notes: true
38+
env:
39+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)