Skip to content

Commit

Permalink
Add GitHub action for TestFlight builds
Browse files Browse the repository at this point in the history
  • Loading branch information
tbodt committed Nov 15, 2020
1 parent 15ec279 commit 1f87ea3
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 6 deletions.
20 changes: 19 additions & 1 deletion .github/workflows/beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,27 @@ on:
workflow_dispatch:

jobs:
yeet:
push-beta:
runs-on: macos-10.15
steps:
- 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 74480058+ish-actions@users.noreply.github.com
- name: Fastlane
run: bundle exec fastlane beta
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 }}
APP_STORE_CONNECT_API_KEY_KEY: ${{ secrets.APP_STORE_CONNECT_KEY }}
MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GITHUB_AUTH }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSPHRASE }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
SLACK_URL: ${{ secrets.SLACK_URL }}
FASTLANE_SKIP_UPDATE_CHECK: 1
31 changes: 26 additions & 5 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,23 @@
lane :beta do
app_store_connect_api_key
setup_ci
sync_code_signing
sync_code_signing(type: 'appstore')
if is_ci
update_code_signing_settings(
path: 'iSH.xcodeproj',
targets: 'iSH',
use_automatic_signing: false,
profile_uuid: ENV['sigh_app.ish.iSH_development'],
)
update_code_signing_settings(
path: 'iSH.xcodeproj',
targets: 'iSHFileProvider',
use_automatic_signing: false,
profile_uuid: ENV['sigh_app.ish.iSH.FileProvider_development'],
)
end

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`
Expand All @@ -12,17 +31,19 @@ lane :beta do
include: "fastlane/changelog.txt",
force: true,
)
tag = "builds/#{build_number}"
add_git_tag(tag: tag)

build_app(project: 'iSH.xcodeproj', scheme: 'iSH')
build_app(
project: 'iSH.xcodeproj',
scheme: 'iSH',
)
upload_to_testflight(
changelog: testflight_changelog,
wait_for_uploaded_build: true,
distribute_external: true,
groups: ["People"]
)

tag = "builds/#{build_number}"
add_git_tag(tag: tag)
push_to_git_remote
set_github_release(
repository_name: 'ish-app/ish',
Expand All @@ -31,7 +52,7 @@ lane :beta do
name: "Build #{build_number}",
description: changelog,
upload_assets: ['iSH.ipa'],
api_token: ENV['GITHUB_TOKEN'],
api_token: ENV['GH_TOKEN'],
)
slack(
message: "New build available!",
Expand Down

0 comments on commit 1f87ea3

Please sign in to comment.