@@ -2,14 +2,10 @@ name: 4. Build Loop Follow
22run-name : Build Loop Follow (${{ github.ref_name }})
33on :
44 workflow_dispatch :
5-
6- # # Remove the "#" sign from the beginning of the line below to get automated builds on push (code changes in your repository)
7- # push:
8-
9- # # Remove the "#" sign from the beginning of the two lines below to get automated builds every two months
10- # schedule:
11- # - cron: '0 17 1 */2 *' # Runs at 17:00 UTC on the 1st in Jan, Mar, May, Jul, Sep and Nov.
12-
5+ push :
6+ schedule :
7+ - cron : " 0 9 * * 3" # Weekly trigger: every Wednesday at 09:00 UTC
8+ - cron : " 0 7 1 * *" # Monthly trigger: on the 1st of every month at 07:00 UTC
139
1410jobs :
1511 validate :
@@ -22,25 +18,20 @@ jobs:
2218 needs : validate
2319 runs-on : macos-15
2420 steps :
25- # Uncomment to manually select latest Xcode if needed
2621 - name : Select Latest Xcode
2722 run : " sudo xcode-select --switch /Applications/Xcode_16.2.app/Contents/Developer"
28-
29- # Checks-out the repo
23+
3024 - name : Checkout Repo
3125 uses : actions/checkout@v4
3226 with :
3327 submodules : recursive
3428
35- # Patch Fastlane Match to not print tables
3629 - name : Patch Match Tables
3730 run : find /usr/local/lib/ruby/gems -name table_printer.rb | xargs sed -i "" "/puts(Terminal::Table.new(params))/d"
38-
39- # Sync the GitHub runner clock with the Windows time server (workaround as suggested in https://github.com/actions/runner/issues/2996)
31+
4032 - name : Sync clock
4133 run : sudo sntp -sS time.windows.com
4234
43- # Build signed Loop Follow IPA file
4435 - name : Fastlane Build & Archive
4536 run : fastlane build_LoopFollow
4637 env :
5142 FASTLANE_KEY : ${{ secrets.FASTLANE_KEY }}
5243 MATCH_PASSWORD : ${{ secrets.MATCH_PASSWORD }}
5344
54- # Upload to TestFlight
5545 - name : Fastlane upload to TestFlight
5646 run : fastlane release
5747 env :
@@ -61,12 +51,62 @@ jobs:
6151 FASTLANE_ISSUER_ID : ${{ secrets.FASTLANE_ISSUER_ID }}
6252 FASTLANE_KEY : ${{ secrets.FASTLANE_KEY }}
6353 MATCH_PASSWORD : ${{ secrets.MATCH_PASSWORD }}
64-
65- # Upload IPA and Symbols
54+
6655 - name : Upload IPA and Symbol artifacts
6756 uses : actions/upload-artifact@v4
6857 with :
6958 name : build-artifacts
7059 path : |
7160 artifacts
7261 buildlog
62+
63+ check_certs :
64+ name : Check Certificates
65+ uses : ./.github/workflows/create_certs.yml
66+ secrets : inherit
67+
68+ nuke_certs :
69+ name : Nuke Certificates
70+ needs : [validate, check_certs]
71+ runs-on : macos-14
72+ if : ${{ (needs.check_certs.outputs.new_certificate_needed == 'true' && vars.ENABLE_NUKE_CERTS == 'true') || vars.FORCE_NUKE_CERTS == 'true' }}
73+ steps :
74+ - name : Show certificate check output
75+ run : echo "new_certificate_needed=${{ needs.check_certs.outputs.new_certificate_needed }}"
76+
77+ - name : Checkout repository
78+ uses : actions/checkout@v4
79+
80+ - name : Install dependencies
81+ run : bundle install
82+
83+ - name : Run Fastlane nuke_certs
84+ run : |
85+ set -e
86+ bundle exec fastlane nuke_certs
87+
88+ - name : Recreate Distribution certificate after nuking
89+ run : |
90+ set -e
91+ bundle exec fastlane certs
92+
93+ - name : Add success annotations
94+ if : ${{ success() }}
95+ run : |
96+ echo "::warning::⚠️ All Distribution certificates and TestFlight profiles have been revoked and recreated."
97+ echo "::warning::❗️ If you have other apps that do not auto-renew certificates, run their 'Create Certificates' workflow."
98+ echo "::warning::✅ Your existing TestFlight builds will keep working!"
99+
100+ keep_alive :
101+ name : Keep Alive
102+ needs : [validate]
103+ runs-on : ubuntu-latest
104+ if : ${{ github.event_name == 'schedule' }}
105+ steps :
106+ - name : Checkout repository
107+ uses : actions/checkout@v4
108+ - name : Keep alive branch
109+ run : |
110+ git checkout -B alive-main
111+ git commit --allow-empty -m 'Keep alive commit'
112+ git push origin alive-main
0 commit comments