Skip to content

Commit

Permalink
Split ASC build from upload in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
mokagio committed Aug 8, 2024
1 parent 9fe2ede commit 4d7a230
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 11 deletions.
8 changes: 2 additions & 6 deletions .buildkite/commands/release-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,5 @@ install_cocoapods
echo "--- :closed_lock_with_key: Installing Secrets"
bundle exec fastlane run configure_apply

echo "--- :hammer_and_wrench: Build and Upload to App Store Connect"
bundle exec fastlane build_and_upload_to_app_store_connect \
skip_confirm:true \
skip_prechecks:true \
create_release:true \
"beta_release:${1:-true}" # use first call param, default to true for safety
echo "--- :hammer_and_wrench: Build for App Store Connect"
bundle exec fastlane build_for_app_store_connect
20 changes: 20 additions & 0 deletions .buildkite/commands/release-upload.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash -eu

echo "--- :arrow_down: Downloading Artifacts"
ARTIFACTS_DIR='build/results'
STEP=testflight_build
buildkite-agent artifact download "$ARTIFACTS_DIR/*.ipa" . --step $STEP
buildkite-agent artifact download "$ARTIFACTS_DIR/*.zip" . --step $STEP

echo "--- :rubygems: Setting up Gems"
install_gems

echo "--- :closed_lock_with_key: Installing Secrets"
bundle exec fastlane run configure_apply

echo "--- :hammer_and_wrench: Upload to App Store Connect"
bundle exec fastlane upload_to_app_store_connect \
skip_confirm:true \
skip_prechecks:true \
create_release:true \
"beta_release:${1:-true}" # use first call param, default to true for safety
22 changes: 17 additions & 5 deletions .buildkite/release-build.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,23 @@
env:
IMAGE_ID: $IMAGE_ID
agents:
queue: mac

steps:
- label: ":testflight: Simplenote iOS Release Build (App Store Connect)"
- label: ":testflight: Build Simplenote iOS for App Store Connect"
key: testflight_build
command: .buildkite/commands/release-build.sh
priority: 1
env:
IMAGE_ID: $IMAGE_ID
agents:
queue: mac
plugins: [$CI_TOOLKIT_PLUGIN]
artifact_paths:
- build/results/*.zip
- build/results/*.ipa
- build/results/*.xcarchive

- label: ":testflight: Upload Simplenote iOS to App Store Connect"
depends_on: testflight_build
command: .buildkite/commands/release-upload.sh
priority: 1
plugins: [$CI_TOOLKIT_PLUGIN]
notify:
- slack: "#build-and-ship"

0 comments on commit 4d7a230

Please sign in to comment.