Skip to content

Commit 470087e

Browse files
committed
Revert "re-use the IPA from the first step"
This reverts commit 4d29cfe.
1 parent 4d29cfe commit 470087e

2 files changed

Lines changed: 53 additions & 31 deletions

File tree

.github/workflows/publish-release.yml

Lines changed: 44 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -80,15 +80,8 @@ jobs:
8080
build/SnapSafe.ipa
8181
token: ${{ secrets.GITHUB_TOKEN }}
8282

83-
- name: Upload IPA artifact
84-
uses: actions/upload-artifact@v4
85-
with:
86-
name: SnapSafe-IPA
87-
path: build/SnapSafe.ipa
88-
retention-days: 1
89-
9083
build-and-publish-app-store:
91-
name: Upload to App Store
84+
name: Build and publish to App Store
9285
runs-on: macos-latest
9386
needs: build-and-publish-github-release
9487
timeout-minutes: 30
@@ -97,6 +90,12 @@ jobs:
9790
- name: Checkout code
9891
uses: actions/checkout@v5
9992

93+
- name: Set Xcode version
94+
run: sudo xcode-select -s /Applications/Xcode_26.0.1.app
95+
96+
- name: Show Xcode version
97+
run: xcodebuild -version
98+
10099
- name: Set up Ruby
101100
uses: ruby/setup-ruby@v1
102101
with:
@@ -106,15 +105,45 @@ jobs:
106105
- name: Install dependencies
107106
run: bundle install
108107

109-
- name: Download IPA artifact
110-
uses: actions/download-artifact@v4
111-
with:
112-
name: SnapSafe-IPA
113-
path: build
108+
- name: Disable macro validation
109+
run: |
110+
defaults write com.apple.dt.Xcode IDESkipMacroFingerprintValidation -bool YES
111+
112+
- name: Import certificates
113+
env:
114+
CERTIFICATE_BASE64: ${{ secrets.IOS_DISTRIBUTION_CERTIFICATE_BASE64 }}
115+
CERTIFICATE_PASSWORD: ${{ secrets.IOS_DISTRIBUTION_CERTIFICATE_PASSWORD }}
116+
PROVISIONING_PROFILE_BASE64: ${{ secrets.IOS_PROVISIONING_PROFILE_BASE64 }}
117+
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
118+
run: |
119+
# Create keychain
120+
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
121+
security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
122+
security set-keychain-settings -lut 21600 $KEYCHAIN_PATH
123+
security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
124+
125+
# Import certificate
126+
CERTIFICATE_PATH=$RUNNER_TEMP/certificate.p12
127+
echo "$CERTIFICATE_BASE64" | base64 --decode > $CERTIFICATE_PATH
128+
security import $CERTIFICATE_PATH -P "$CERTIFICATE_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
129+
security list-keychain -d user -s $KEYCHAIN_PATH
130+
131+
# Import provisioning profile
132+
PROVISION_PATH=$RUNNER_TEMP/provision.mobileprovision
133+
echo "$PROVISIONING_PROFILE_BASE64" | base64 --decode > $PROVISION_PATH
134+
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
135+
cp $PROVISION_PATH ~/Library/MobileDevice/Provisioning\ Profiles/
136+
137+
- name: Set up App Store Connect API Key
138+
env:
139+
API_KEY_CONTENT: ${{ secrets.APP_STORE_CONNECT_API_KEY_CONTENT }}
140+
API_KEY_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_ID }}
141+
run: |
142+
mkdir -p ~/private_keys
143+
echo "$API_KEY_CONTENT" | base64 --decode > ~/private_keys/AuthKey_${API_KEY_ID}.p8
114144
115-
- name: Upload to App Store
145+
- name: Deploy to App Store
116146
env:
117147
APP_STORE_CONNECT_API_KEY_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_ID }}
118148
APP_STORE_CONNECT_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_ISSUER_ID }}
119-
APP_STORE_CONNECT_API_KEY_CONTENT: ${{ secrets.APP_STORE_CONNECT_API_KEY_CONTENT }}
120149
run: bundle exec fastlane deploy

fastlane/Fastfile

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -96,22 +96,16 @@ platform :ios do
9696

9797
desc "Build and upload to App Store Connect"
9898
lane :deploy do
99-
# Check if IPA already exists (e.g., from CI artifact)
100-
ipa_path = "./build/SnapSafe.ipa"
101-
102-
unless File.exist?(ipa_path)
103-
# Build IPA if it doesn't exist
104-
gym(
105-
project: "SnapSafe.xcodeproj",
106-
scheme: "SnapSafe",
107-
export_method: "app-store",
108-
export_options: {
109-
provisioningProfiles: {
110-
"com.darkrockstudios.apps.snapsafe" => "SnapSafe Distribution"
111-
}
99+
gym(
100+
project: "SnapSafe.xcodeproj",
101+
scheme: "SnapSafe",
102+
export_method: "app-store",
103+
export_options: {
104+
provisioningProfiles: {
105+
"com.darkrockstudios.apps.snapsafe" => "SnapSafe Distribution"
112106
}
113-
)
114-
end
107+
}
108+
)
115109

116110
app_store_connect_api_key(
117111
key_id: ENV["APP_STORE_CONNECT_API_KEY_ID"],
@@ -121,7 +115,6 @@ platform :ios do
121115
)
122116

123117
upload_to_app_store(
124-
ipa: ipa_path,
125118
skip_screenshots: true,
126119
skip_metadata: true,
127120
submit_for_review: false,

0 commit comments

Comments
 (0)