Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable CI builds to TestFlight #595

Merged
merged 1 commit into from
Dec 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 37 additions & 10 deletions .github/workflows/publish-beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,20 @@ name: Publish Beta

on:
workflow_dispatch:
inputs:
upload:
description: Upload the build to TestFlight
type: boolean
default: false
required: true
changelog:
description: Changelog for TestFlight
type: string
notify_testers:
description: Notify TestFlight testers
type: boolean
default: true
required: true

jobs:
publish:
Expand All @@ -12,6 +26,20 @@ jobs:
- name: Check out Git repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Set up Node.js
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: 20
check-latest: true
cache: npm

- name: Install Node.js dependencies
run: npm ci --no-audit

- name: Install Pods
run: |
cd ios && pod install

- name: Setup signing environment
env:
BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }}
Expand Down Expand Up @@ -43,18 +71,17 @@ jobs:
sudo mkdir -p /Library/MobileDevice/Provisioning\ Profiles
cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles
sudo cp $PP_PATH /Library/MobileDevice/Provisioning\ Profiles


- name: Decode signing profile secrets
run: |
echo "FL_CODE_SIGN_IDENTITY=$(echo ${{ secrets.CODE_SIGN_64 }} | base64 --decode)" >> $GITHUB_ENV
echo "FL_PROVISIONING_PROFILE_SPECIFIER=$(echo ${{ secrets.PROFILE_NAME_64_EXPO }} | base64 --decode)" >> $GITHUB_ENV

- name: Build and publish beta
env:
APP_STORE_CONNECT_API_KEY_KEY_ID: ${{ secrets.APP_STORE_KEY_ID_EXPO }}
APP_STORE_CONNECT_API_KEY_ISSUER_ID: ${{ secrets.APP_STORE_ISSUER_ID }}
APP_STORE_CONNECT_API_KEY_KEY: ${{ secrets.APP_STORE_KEY_CONTENTS_EXPO }}
APP_STORE_CONNECT_API_KEY_IS_KEY_CONTENT_BASE64: true
APP_STORE_CONNECT_API_KEY_DURATION: 1200
APP_STORE_CONNECT_API_KEY_IN_HOUSE: false
run: fastlane beta \
keyID:"${{ secrets.APP_STORE_KEY_ID_EXPO }}" \
issuerID:"${{ secrets.APP_STORE_ISSUER_ID }}" \
keyContents:"${{ secrets.APP_STORE_KEY_CONTENTS_EXPO }}" \
codeSign64:"${{ secrets.CODE_SIGN_64 }}" \
profileName64:"${{ secrets.PROFILE_NAME_64_EXPO }}"
PILOT_CHANGELOG: ${{ github.event.inputs.changelog }}
PILOT_NOTIFY_EXTERNAL_TESTERS: ${{ github.event.inputs.notify_testers }}
run: fastlane beta upload:${{ github.event.inputs.upload }}
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
source "https://rubygems.org"

gem "fastlane"
gem "cocoapods"
2 changes: 1 addition & 1 deletion fastlane/Appfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
app_identifier("[[APP_IDENTIFIER]]") # The bundle identifier of your app
app_identifier("org.jellyfin.expo") # The bundle identifier of your app
# apple_id("[[APPLE_ID]]") # Your Apple Developer Portal username


Expand Down
34 changes: 30 additions & 4 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,37 @@ end
platform :ios do
desc "Publish beta to TestFlight"
lane :beta do |options|
ensure_env_vars(
env_vars: [
"APP_STORE_CONNECT_API_KEY_KEY_ID",
"APP_STORE_CONNECT_API_KEY_ISSUER_ID",
"APP_STORE_CONNECT_API_KEY_KEY",
"FL_CODE_SIGN_IDENTITY",
"FL_PROVISIONING_PROFILE_SPECIFIER"
]
)

xcodes(version: "15.4")

# FIXME: Build and publish the app
# build_app(scheme: "Jellyfin",
# workspace: "ios/Jellyfin.xcworkspace",
# configuration: "Release")
app_store_connect_api_key(
is_key_content_base64: true,
duration: 1200,
in_house: false
)

update_code_signing_settings(
path: "ios/Jellyfin.xcodeproj",
use_automatic_signing: false
)

build_app(
scheme: "Jellyfin",
workspace: "ios/Jellyfin.xcworkspace",
configuration: "Release"
)

if options[:upload]
upload_to_testflight()
end
end
end
Loading