Skip to content

Commit 7133f17

Browse files
Copilotkiyarose
andauthored
Plan: sync build-and-release.yml with prerelease.yml and add duplicate tag handling
Agent-Logs-Url: https://github.com/SillyLittleTech/Flean/sessions/0d9831c6-41ea-44f5-b116-a54ae0e79047 Co-authored-by: kiyarose <75678535+kiyarose@users.noreply.github.com>
1 parent 44494d5 commit 7133f17

1 file changed

Lines changed: 54 additions & 4 deletions

File tree

.github/workflows/prerelease.yml

Lines changed: 54 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,29 +33,59 @@ jobs:
3333
run: |
3434
cd ios
3535
mkdir -p build
36-
xcodebuild build \
36+
37+
xcodebuild archive \
3738
-project Flean.xcodeproj \
3839
-target Flean \
3940
-configuration Release \
41+
-archivePath build/Flean.xcarchive \
4042
-destination 'generic/platform=iOS' \
41-
-destination 'generic/platform=iOS Simulator' \
43+
-skipPackagePluginValidation \
4244
CODE_SIGN_IDENTITY="" \
43-
CODE_SIGNING_ALLOWED=NO
45+
CODE_SIGNING_REQUIRED=NO \
46+
CODE_SIGN_ENTITLEMENTS=""
47+
48+
# Zip the .app from inside the xcarchive for distribution
49+
APP_PATH=$(find build/Flean.xcarchive/Products -name "Flean.app" -type d | head -1)
50+
if [ -z "$APP_PATH" ]; then
51+
echo "❌ Flean.app not found in xcarchive"
52+
exit 1
53+
fi
54+
APP_DIR="$(dirname "$APP_PATH")"
55+
OUT_ZIP="$(pwd)/build/Flean-iOS.app.zip"
56+
( cd "$APP_DIR" && zip -r "$OUT_ZIP" "Flean.app" )
57+
echo "✅ iOS build succeeded"
4458
4559
- name: Build macOS
4660
run: |
4761
cd mos
4862
mkdir -p build
63+
4964
xcodebuild build \
5065
-project Flean.xcodeproj \
5166
-target Flean \
5267
-configuration Release \
68+
-skipPackagePluginValidation \
5369
SYMROOT=build \
5470
CODE_SIGN_IDENTITY="" \
55-
CODE_SIGNING_REQUIRED=NO
71+
CODE_SIGNING_REQUIRED=NO \
72+
CODE_SIGN_ENTITLEMENTS=""
73+
74+
# Find and zip the .app
75+
APP_PATH=$(find build -name "Flean.app" -type d | head -1)
76+
if [ -z "$APP_PATH" ]; then
77+
echo "❌ Flean.app not found"
78+
exit 1
79+
fi
80+
OUT_ZIP="$(pwd)/build/Flean.app.zip"
81+
APP_DIR="$(dirname "$APP_PATH")"
82+
APP_NAME="$(basename "$APP_PATH")"
83+
( cd "$APP_DIR" && zip -r "$OUT_ZIP" "$APP_NAME" )
84+
echo "✅ macOS build succeeded"
5685
5786
- name: Create Prerelease
5887
uses: actions/create-release@v1
88+
id: create_prerelease
5989
env:
6090
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6191
with:
@@ -70,3 +100,23 @@ jobs:
70100
This is a prerelease. Testing and feedback welcome!
71101
draft: false
72102
prerelease: true
103+
104+
- name: Upload iOS App
105+
uses: actions/upload-release-asset@v1
106+
env:
107+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
108+
with:
109+
upload_url: ${{ steps.create_prerelease.outputs.upload_url }}
110+
asset_path: ./ios/build/Flean-iOS.app.zip
111+
asset_name: Flean-iOS.app.zip
112+
asset_content_type: application/zip
113+
114+
- name: Upload macOS App
115+
uses: actions/upload-release-asset@v1
116+
env:
117+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
118+
with:
119+
upload_url: ${{ steps.create_prerelease.outputs.upload_url }}
120+
asset_path: ./mos/build/Flean.app.zip
121+
asset_name: Flean.app.zip
122+
asset_content_type: application/zip

0 commit comments

Comments
 (0)