Skip to content

Commit 7e472b3

Browse files
Bump version to 0.7.0, fix CI workflows, add ci-build-and-release script
- Fix macOS workflow: correct Rust action, use xcodebuild, add --no-sign - Remove direct release upload from both CI workflows (use draft releases) - Add ci-build-and-release.sh to trigger builds and upload artifacts - Update CLAUDE.md with CI build and release process Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 1da33a0 commit 7e472b3

8 files changed

Lines changed: 275 additions & 56 deletions

File tree

.github/workflows/build-macos.yml

Lines changed: 33 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,7 @@ on:
1919
- arm64
2020
- x64
2121
- both
22-
default: both
23-
upload_to_release:
24-
description: 'Upload to GitHub release'
25-
required: false
26-
type: boolean
27-
default: true
22+
default: arm64
2823

2924
jobs:
3025
build:
@@ -37,14 +32,12 @@ jobs:
3732
- name: Setup Flutter
3833
uses: subosito/flutter-action@v2
3934
with:
40-
flutter-version: '3.27.0'
4135
channel: 'stable'
4236
cache: true
4337

4438
- name: Setup Rust
45-
uses: dtolnay/rust-action@stable
39+
uses: dtolnay/rust-toolchain@stable
4640
with:
47-
toolchain: stable
4841
targets: aarch64-apple-darwin,x86_64-apple-darwin
4942

5043
- name: Cache Rust dependencies
@@ -90,6 +83,10 @@ jobs:
9083
echo "Dependencies extracted:"
9184
ls -la deps/
9285
86+
- name: Setup CocoaPods
87+
run: |
88+
gem install cocoapods
89+
9390
- name: Update version numbers
9491
run: |
9592
VERSION="${{ inputs.version }}"
@@ -127,33 +124,44 @@ jobs:
127124
cd app
128125
flutter pub get
129126
dart run build_runner build --delete-conflicting-outputs
130-
flutter build macos --release
127+
128+
# Two-step xcodebuild — flutter build macos fails with module dependency errors
129+
cd macos
130+
rm -rf Pods Podfile.lock
131+
pod install
132+
133+
# Build Pods-Runner scheme first (all CocoaPods dependencies)
134+
xcodebuild -workspace Runner.xcworkspace -scheme Pods-Runner \
135+
-configuration Release build ONLY_ACTIVE_ARCH=NO \
136+
-quiet
137+
138+
# Build Runner for arm64 only (must match Podfile ARCHS setting)
139+
xcodebuild -workspace Runner.xcworkspace -scheme Runner \
140+
-configuration Release build ARCHS=arm64 ONLY_ACTIVE_ARCH=YES \
141+
-quiet
142+
143+
# Copy to Flutter build location
144+
DERIVED_APP=$(find ~/Library/Developer/Xcode/DerivedData/Runner-*/Build/Products/Release/vapourbox.app -maxdepth 0 2>/dev/null | head -1)
145+
if [ -z "$DERIVED_APP" ]; then
146+
echo "ERROR: Could not find built app in DerivedData"
147+
exit 1
148+
fi
149+
mkdir -p ../build/macos/Build/Products/Release
150+
cp -R "$DERIVED_APP" ../build/macos/Build/Products/Release/
131151
132152
- name: Package release (arm64)
133153
if: ${{ inputs.arch == 'arm64' || inputs.arch == 'both' }}
134154
run: |
135-
VERSION="${{ inputs.version }}"
136-
./Scripts/package-macos.sh --version "$VERSION" --arch arm64 --skip-build
155+
./Scripts/package-macos.sh --version "${{ inputs.version }}" --arch arm64 --skip-build --no-sign
137156
138157
- name: Package release (x64)
139158
if: ${{ inputs.arch == 'x64' || inputs.arch == 'both' }}
140159
run: |
141-
VERSION="${{ inputs.version }}"
142-
./Scripts/package-macos.sh --version "$VERSION" --arch x64 --skip-build
160+
./Scripts/package-macos.sh --version "${{ inputs.version }}" --arch x64 --skip-build --no-sign
143161
144162
- name: Upload artifacts
145163
uses: actions/upload-artifact@v4
146164
with:
147165
name: VapourBox-${{ inputs.version }}-macos
148-
path: dist/VapourBox-${{ inputs.version }}-macos-*.zip
166+
path: dist/VapourBox-${{ inputs.version }}-macos-*.dmg
149167

150-
- name: Upload to release
151-
if: ${{ inputs.upload_to_release }}
152-
env:
153-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
154-
run: |
155-
for f in dist/VapourBox-${{ inputs.version }}-macos-*.zip; do
156-
if [ -f "$f" ]; then
157-
gh release upload "v${{ inputs.version }}" "$f" --clobber || echo "Release may not exist yet"
158-
fi
159-
done

.github/workflows/build-windows.yml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,6 @@ on:
1111
description: 'Deps release tag (e.g., deps-v1.0.0)'
1212
required: true
1313
type: string
14-
upload_to_release:
15-
description: 'Upload to GitHub release'
16-
required: false
17-
type: boolean
18-
default: true
1914

2015
jobs:
2116
build:
@@ -194,9 +189,3 @@ jobs:
194189
name: VapourBox-${{ inputs.version }}-windows-x64
195190
path: dist/VapourBox-${{ inputs.version }}-windows-x64.zip
196191

197-
- name: Upload to release
198-
if: ${{ inputs.upload_to_release }}
199-
env:
200-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
201-
run: |
202-
gh release upload "v${{ inputs.version }}" "dist/VapourBox-${{ inputs.version }}-windows-x64.zip" --clobber || echo "Release may not exist yet"

CLAUDE.md

Lines changed: 50 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1401,6 +1401,7 @@ The release system automates the entire process of creating releases for both ma
14011401
| Script | Purpose |
14021402
|--------|---------|
14031403
| `Scripts/release.sh` | Main orchestrator - runs the full release process |
1404+
| `Scripts/ci-build-and-release.sh` | Trigger CI builds, download artifacts, upload to draft release |
14041405
| `Scripts/get-github-version.sh` | Fetch latest versions from GitHub releases |
14051406
| `Scripts/update-version.sh` | Update version across all project files |
14061407
| `Scripts/check-deps-changed.sh` | Detect if dependencies changed since last release |
@@ -1416,6 +1417,8 @@ The release system automates the entire process of creating releases for both ma
14161417
| `.github/workflows/build-windows.yml` | Build Windows app remotely |
14171418
| `.github/workflows/build-macos.yml` | Build macOS app remotely |
14181419

1420+
Both workflows produce build artifacts only — they do **not** upload directly to releases. Use `ci-build-and-release.sh` to trigger them, download artifacts, and upload to a draft release.
1421+
14191422
### Quick Start
14201423

14211424
Run from macOS to create a full release:
@@ -1433,6 +1436,33 @@ This will:
14331436
6. Trigger GitHub Actions for Windows build
14341437
7. Create draft GitHub release
14351438

1439+
### CI Build and Release
1440+
1441+
To build both platforms via GitHub Actions and attach artifacts to a draft release:
1442+
1443+
```bash
1444+
# Full flow: trigger builds, wait, download artifacts, upload to draft release
1445+
./Scripts/ci-build-and-release.sh --version 0.7.0
1446+
1447+
# With custom deps tag and both macOS architectures
1448+
./Scripts/ci-build-and-release.sh --version 0.7.0 --deps-tag deps-v1.1.0 --arch both
1449+
1450+
# Just download latest artifacts and upload (don't trigger new builds)
1451+
./Scripts/ci-build-and-release.sh --version 0.7.0 --skip-trigger
1452+
```
1453+
1454+
Prerequisites:
1455+
- A draft release must already exist for the version tag (e.g., `v0.7.0`)
1456+
- `gh` CLI installed and authenticated
1457+
- Deps tag defaults to the value in `app/assets/deps-version.json`
1458+
1459+
The script:
1460+
1. Verifies the draft release exists
1461+
2. Triggers Build Windows and Build macOS workflows
1462+
3. Waits for both to complete (fails if either fails)
1463+
4. Downloads artifacts to `dist/ci-artifacts/`
1464+
5. Uploads `.zip` and `.dmg` files to the draft release
1465+
14361466
### Script Details
14371467

14381468
#### `Scripts/get-github-version.sh`
@@ -1538,29 +1568,35 @@ If you prefer manual control:
15381568
./Scripts/update-version.sh --app 0.2.0 --deps 1.1.0 --deps-tag deps-v1.1.0
15391569
```
15401570

1541-
6. **Build apps:**
1571+
6. **Create draft release:**
15421572
```bash
1543-
# macOS
1544-
cd worker && cargo build --release
1545-
cd ../app && flutter pub get && flutter build macos --release
1546-
./Scripts/package-macos.sh --version 0.2.0 --skip-build
1573+
gh release create v0.2.0 \
1574+
--title "VapourBox 0.2.0" \
1575+
--draft
1576+
```
15471577

1548-
# Windows (via GitHub Actions or on Windows machine)
1549-
gh workflow run build-windows.yml -f version=0.2.0 -f deps_tag=deps-v1.1.0
1578+
7. **Build via CI and upload artifacts:**
1579+
```bash
1580+
# Triggers both macOS and Windows builds, waits, downloads, uploads to draft
1581+
./Scripts/ci-build-and-release.sh --version 0.2.0 --deps-tag deps-v1.1.0
15501582
```
15511583

1552-
7. **Create app release:**
1584+
Or build locally (macOS only) and trigger Windows separately:
15531585
```bash
1554-
gh release create v0.2.0 \
1555-
--title "VapourBox 0.2.0" \
1556-
--draft \
1557-
dist/VapourBox-0.2.0-macos-*.zip
1586+
# macOS local build
1587+
cd worker && cargo build --release
1588+
cd ../app && flutter pub get && flutter build macos --release
1589+
./Scripts/package-macos.sh --version 0.2.0 --skip-build
1590+
gh release upload v0.2.0 dist/VapourBox-0.2.0-macos-arm64.dmg
15581591
```
15591592

1593+
8. **Publish:** Review the draft release and publish when ready.
1594+
15601595
### Cross-Platform Notes
15611596

1562-
- **Flutter Windows on macOS**: Not possible natively. Use GitHub Actions or Windows machine.
1563-
- **Flutter macOS on Windows**: Not possible natively. Use GitHub Actions or macOS machine.
1597+
- **Flutter Windows on macOS**: Not possible natively. Use GitHub Actions.
1598+
- **Flutter macOS on macOS CI**: Uses GitHub Actions free tier (200 mins/month for public repos).
15641599
- **Deps packaging**: Windows deps can be zipped on macOS if `deps/windows-x64/` exists.
1600+
- **CI builds are unsigned**: macOS DMGs from CI are ad-hoc signed. For distribution, sign locally or set up code signing secrets in CI.
15651601

15661602
---

0 commit comments

Comments
 (0)