Skip to content

Commit

Permalink
Automate daily testflight builds
Browse files Browse the repository at this point in the history
🙏
  • Loading branch information
tbodt committed Feb 6, 2021
1 parent 300acb2 commit 66c1f86
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 27 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/update-alpine-repo.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: "Update Alpine Repo"
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
schedule:
- cron: "0 0 * * *"

jobs:
update:
Expand All @@ -11,15 +11,15 @@ jobs:
- uses: actions/checkout@v2
- name: Setup dependencies
run: |
sudo apt-get install rclone
mkdir -p ~/.config/rclone
echo "$RCLONE_CONFIG" > ~/.config/rclone/rclone.conf
sudo apt-get install rclone
mkdir -p ~/.config/rclone
echo "$RCLONE_CONFIG" > ~/.config/rclone/rclone.conf
env:
RCLONE_CONFIG: ${{ secrets.RCLONE_CONFIG }}
RCLONE_CONFIG: ${{ secrets.RCLONE_CONFIG }}
- name: Update
run: |
deps/aports/sync-archive.sh v3.12 main/x86
deps/aports/sync-archive.sh v3.12 community/x86
deps/aports/sync-archive.sh v3.12 main/x86
deps/aports/sync-archive.sh v3.12 community/x86
- name: Commit
id: commit
run: |
Expand Down
24 changes: 10 additions & 14 deletions .github/workflows/upload-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: Upload Build

on:
workflow_dispatch:
schedule:
- cron: "0 6 * * *"

jobs:
upload-build:
Expand All @@ -14,13 +16,13 @@ jobs:

- name: Install deps
run: |
pip3 install meson
brew install ninja
bundle install
git config user.name github-actions
git config user.email github-actions@github.cog
cd deps/aports
./download-repos.py
pip3 install meson
brew install ninja
bundle install
git config user.name github-actions
git config user.email github-actions@github.cog
cd deps/aports
./download-repos.py
- name: Fastlane
timeout-minutes: 720
Expand All @@ -44,14 +46,8 @@ jobs:
iSH-appstore.app.dSYM.zip
- uses: actions/upload-artifact@v2
if: ${{ always() }}
if: always()
with:
name: Fastlane Logs
path: fastlane.log

- name: Delete changelog
run: |
git rm fastlane/changelog.txt
git commit -m "Make sure a new changelog is written for the next build"
git push
12 changes: 8 additions & 4 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,15 @@ lane :build do |options|
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
if shortlog.empty?
UI.error "No commits since last build"
next
end
testflight_changelog = shortlog + "\n" + File.read("footer.txt")

app_store_connect_api_key
latest = latest_testflight_build_number.to_s.scan(/^\d+(?=\.|$)/).first.to_i
build_number = latest + 1
Dir.chdir("..") do
Expand All @@ -61,6 +63,8 @@ lane :upload_build do
ipa: "iSH-appstore.ipa",
changelog: testflight_changelog,
wait_processing_interval: 300, # the processing is expected to take a total of 5 hours, so don't logspam too much
distribute_external: true,
groups: ["People"],
)

# uploading a build takes about 5 hours, so merge master back in if there have been any commits during that
Expand Down
5 changes: 5 additions & 0 deletions fastlane/footer.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
If you see an "IO ERROR" while using APK, let me know! I'm trying to collect diagnostics for an Apple bug report. Please send me the following:
- Output of `dmesg` immediately after the error appears.
- The date and approximate time/timezone when the error appeared (for Apple to find the right logs).
- A sysdiagnose collected immediately after the error appears. Instructions at https://go.ish.app/sysdiagnose. TL;DR: press both volume buttons and the power button at the same time for a few seconds, wait 10 minutes (no way to see any progress indicator), then export the sysdiagnose in Settings > Privacy > Analytics > Analytics Data.

Send bug reports or feedback here: https://github.com/ish-app/ish/issues (or by email, if you prefer)
Follow iSH on Twitter: https://twitter.com/iSH_app
Join the Discord: https://discord.gg/HFAXj44
Expand Down

0 comments on commit 66c1f86

Please sign in to comment.