-
-
Notifications
You must be signed in to change notification settings - Fork 955
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Redo the GitHub actions for TestFlight
Now makes different builds for App Store and sideloading, where the App Store build is 13gb and the sideloading build is not. Uploads all builds and dSYMs to GitHub releases, except the App Store ipa because it's 13gb. Release is marked "prerelease", so it doesn't actually go out to AltStore until it's edited to be not prerelease. TestFlight build is also not distributed externally (though the changelog is updated). Almost completely untested. Let's see how it goes!
- Loading branch information
Showing
5 changed files
with
72 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: TestFlight Beta | ||
name: TestFlight Build | ||
|
||
on: | ||
workflow_dispatch: | ||
|
@@ -10,15 +10,19 @@ jobs: | |
- uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
|
||
- name: Install deps | ||
run: | | ||
pip3 install meson | ||
brew install ninja | ||
bundle install | ||
git config --global user.name iSH | ||
git config --global user.email [email protected] | ||
cd deps/aports | ||
./download-repos.py | ||
- name: Fastlane | ||
run: bundle exec fastlane beta | ||
run: bundle exec fastlane upload_build | ||
env: | ||
APP_STORE_CONNECT_API_KEY_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_ISSUER_ID }} | ||
APP_STORE_CONNECT_API_KEY_KEY_ID: ${{ secrets.APP_STORE_CONNECT_KEY_ID }} | ||
|
@@ -28,3 +32,11 @@ jobs: | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} | ||
SLACK_URL: ${{ secrets.SLACK_URL }} | ||
FASTLANE_SKIP_UPDATE_CHECK: 1 | ||
|
||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: App | ||
path: | | ||
iSH.ipa | ||
iSH.app.dSYM.zip | ||
iSH-appstore.app.dSYM.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ENABLE_APK_ODRS = YES |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,67 +1,76 @@ | ||
lane :beta do | ||
app_store_connect_api_key | ||
before_all do | ||
ensure_bundle_exec | ||
end | ||
|
||
lane :build do |options| | ||
setup_ci | ||
sync_code_signing | ||
sync_code_signing(type: 'appstore') | ||
|
||
changelog = File.read('changelog.txt') | ||
last_tag = `git describe --tags --abbrev=0 --match builds/\*`.chomp | ||
testflight_changelog = changelog + "\n" + File.read("footer.txt") + `git shortlog #{last_tag}..HEAD` | ||
|
||
latest = latest_testflight_build_number.to_s.scan(/^\d+(?=\.|$)/).first.to_i | ||
build_number = latest + 1 | ||
increment_build_number(build_number: build_number) | ||
commit_version_bump( | ||
xcodeproj: 'iSH.xcodeproj', | ||
message: "Release build #{build_number} to testflight", | ||
include: "fastlane/changelog.txt", | ||
force: true, | ||
) | ||
tag = "builds/#{build_number}" | ||
add_git_tag(tag: tag) | ||
|
||
# do this after commiting the version bump but before building the app | ||
if is_ci | ||
update_code_signing_settings( | ||
path: 'iSH.xcodeproj', | ||
targets: 'iSH', | ||
path: "iSH.xcodeproj", | ||
targets: "iSH", | ||
use_automatic_signing: false, | ||
profile_uuid: ENV['sigh_app.ish.iSH_development'], | ||
profile_uuid: ENV["sigh_app.ish.iSH_development"], | ||
) | ||
update_code_signing_settings( | ||
path: 'iSH.xcodeproj', | ||
targets: 'iSHFileProvider', | ||
path: "iSH.xcodeproj", | ||
targets: "iSHFileProvider", | ||
use_automatic_signing: false, | ||
profile_uuid: ENV['sigh_app.ish.iSH.FileProvider_development'], | ||
profile_uuid: ENV["sigh_app.ish.iSH.FileProvider_development"], | ||
) | ||
end | ||
|
||
config = options[:config] | ||
config = "app/#{config}.xcconfig" if config | ||
build_app( | ||
project: 'iSH.xcodeproj', | ||
scheme: 'iSH', | ||
project: "iSH.xcodeproj", | ||
scheme: "iSH", | ||
xcconfig: config, | ||
output_name: options[:output], | ||
) | ||
end | ||
|
||
lane :upload_build do | ||
app_store_connect_api_key | ||
|
||
changelog = File.read("changelog.txt") | ||
last_tag = `git describe --tags --abbrev=0 --match builds/\*`.chomp | ||
shortlog = `git shortlog #{last_tag}..HEAD` | ||
testflight_changelog = changelog + "\n" + File.read("footer.txt") + shortlog | ||
|
||
latest = latest_testflight_build_number.to_s.scan(/^\d+(?=\.|$)/).first.to_i | ||
build_number = latest + 1 | ||
Dir.chdir("..") do | ||
sh "agvtool", "new-version", build_number.to_s | ||
end | ||
commit_version_bump( | ||
xcodeproj: "iSH.xcodeproj", | ||
message: "Bump version to #{build_number}", | ||
force: true, | ||
) | ||
tag = "builds/#{build_number}" | ||
add_git_tag(tag: tag) | ||
|
||
build | ||
build(config: "AppStore", output: "iSH-appstore") | ||
puts testflight_changelog | ||
upload_to_testflight( | ||
ipa: "iSH-appstore.ipa", | ||
changelog: testflight_changelog, | ||
distribute_external: true, | ||
groups: ["People"] | ||
) | ||
|
||
push_to_git_remote | ||
set_github_release( | ||
repository_name: 'ish-app/ish', | ||
repository_name: "ish-app/ish", | ||
tag_name: tag, | ||
commitish: nil, # the tag better exist | ||
name: "Build #{build_number}", | ||
description: changelog, | ||
upload_assets: ['iSH.ipa'], | ||
api_token: ENV['GH_TOKEN'], | ||
is_prerelease: true, | ||
upload_assets: ["iSH.ipa", "iSH.app.dSYM.zip", "iSH-appstore.app.dSYM.zip"], | ||
api_token: ENV["GH_TOKEN"], | ||
) | ||
slack( | ||
message: "New build available!", | ||
default_payloads: [], | ||
payload: { | ||
"Changelog" => changelog | ||
}, | ||
use_webhook_configured_username_and_icon: true, | ||
) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters