Skip to content

Workflow file for this run

name: Test-build pull request
run-name: PR ${{ vars.PR_NUMBER }}
on:
workflow_dispatch:
jobs:
# Builds Trio
build:
name: Build
runs-on: macos-13
permissions:
contents: write
steps:
# Uncomment to manually select Xcode version if needed
#- name: Select Xcode version
# run: "sudo xcode-select --switch /Applications/Xcode_15.0.1.app/Contents/Developer"
- name: Checkout Repo
uses: actions/checkout@v4
with:
token: ${{ secrets.GH_PAT }}
submodules: recursive
- name: Checkout pull request for building
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
run: |
gh pr checkout ${{ vars.PR_NUMBER }} --repo nightscout/Trio
git submodule
# Patch Fastlane Match to not print tables
- name: Patch Match Tables
run: find /usr/local/lib/ruby/gems -name table_printer.rb | xargs sed -i "" "/puts(Terminal::Table.new(params))/d"
# Install project dependencies
- name: Install project dependencies
run: bundle install
# Build signed Trio IPA file
- name: Fastlane Build & Archive
run: bundle exec fastlane build_trio
env:
TEAMID: ${{ secrets.TEAMID }}
GH_PAT: ${{ secrets.GH_PAT }}
FASTLANE_KEY_ID: ${{ secrets.FASTLANE_KEY_ID }}
FASTLANE_ISSUER_ID: ${{ secrets.FASTLANE_ISSUER_ID }}
FASTLANE_KEY: ${{ secrets.FASTLANE_KEY }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
# Upload to TestFlight
- name: Fastlane upload to TestFlight
run: bundle exec fastlane release
env:
TEAMID: ${{ secrets.TEAMID }}
GH_PAT: ${{ secrets.GH_PAT }}
FASTLANE_KEY_ID: ${{ secrets.FASTLANE_KEY_ID }}
FASTLANE_ISSUER_ID: ${{ secrets.FASTLANE_ISSUER_ID }}
FASTLANE_KEY: ${{ secrets.FASTLANE_KEY }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
# Upload Build artifacts
- name: Upload build log, IPA and Symbol artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: build-artifacts
path: |
artifacts
buildlog