Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
a45e82a
chore: auto upload to testflight
Jul 12, 2025
9efa650
fix: change location of github action yaml file
Jul 12, 2025
32e9bfd
fix: remove unnecessary information for fastfile
Jul 12, 2025
48a89d5
fix: add bundle identifier for fastlane
Jul 12, 2025
8d998c4
fix: fastlane syntax fix
Jul 12, 2025
fa20b74
fix: fix secret names in cd yaml
Jul 12, 2025
8dce588
fix: add build app to fastfile
Jul 12, 2025
376d99d
fix: add cd yaml file supporting files folder creation
Jul 12, 2025
77e922a
extend timeout for fastfile
impri2 Jul 12, 2025
4835536
fix: fix cd yaml
Jul 12, 2025
f357b1d
fix: fix fastlane code sign settings
Jul 12, 2025
461fce0
fix: fix timeout
Jul 12, 2025
754ca06
fix: provide profile name
Jul 12, 2025
080b5b0
fix: fix fastlane code signing update
Jul 12, 2025
fffe93c
fix: fix fastfile
Jul 12, 2025
6b5c3b4
Revert "fix: fix fastlane code signing update"
impri2 Jul 12, 2025
2b7333a
fix: revert fastfile and cd yaml
Jul 12, 2025
e70859f
fix: fix profile type
Jul 12, 2025
cc4af83
Update Fastfile
impri2 Jul 12, 2025
3724d3a
Update Fastfile
impri2 Jul 12, 2025
c9007e6
fix: get connect api before match
impri2 Aug 1, 2025
f59c94d
fix: fix cd yaml
impri2 Aug 1, 2025
e02ace4
fix: remove match force and verbose
impri2 Aug 2, 2025
19cc226
feat: add debug release fastlane line
Aug 2, 2025
39ccb36
fix: fix cd yaml file
Aug 2, 2025
7416a1f
fix: add bundle identifier dev secret to cd yaml
Aug 2, 2025
7bde647
fix: fix cd yaml support file name
Aug 2, 2025
a99d142
fix: remove fastlane debug
Aug 2, 2025
6f27b7c
fix: remove version increment in fastlane
Aug 2, 2025
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
85 changes: 85 additions & 0 deletions .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: Siksha-CD

on:
push:
tags:
- testflight/v[0-9]+.[0-9]+.[0-9]+-*.[0-9]+
- appstore/v[0-9]+.[0-9]+.[0-9]+-*.[0-9]+

jobs:
deploy:
name: Execute fastlane for testflight / appstore

env:
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
SSH_KEY: ${{ secrets.SSH_KEY }}
APPSTORE_CONNECT_KEY_ID: ${{ secrets.APPSTORE_CONNECT_KEY_ID }}
APPSTORE_CONNECT_ISSUER_ID: ${{ secrets.APPSTORE_CONNECT_ISSUER_ID }}
APPSTORE_CONNECT_KEY_CONTENT: ${{ secrets.APPSTORE_CONNECT_KEY_CONTENT }}
PROFILE_NAME: ${{ secrets.PROFILE_NAME }}
TEAM_ID: ${{ secrets.TEAM_ID }}
SLACK_URL: ${{ secrets.SLACK_WEBHOOK }}
GIT_TAG_NAME: ${{ github.ref_name }}
BUNDLE_IDENTIFIER: ${{ secrets.BUNDLE_IDENTIFIER }}
BUNDLE_IDENTIFIER_DEV: ${{ secrets.BUNDLE_IDENTIFIER_DEV }}
XCODE_VERSION: "16.2"

runs-on: macos-15

steps:
- name: Parse tag name
uses: actions-ecosystem/action-regex-match@v2
id: regex
with:
text: ${{ github.ref_name }}
regex: '^(testflight|appstore)\/v(\d+)\.(\d+)\.(\d+)-(release|debug)\.(\d+)$'

- if: ${{ steps.regex.outputs.group1 == 'appstore' && steps.regex.outputs.group5 == 'debug' }}
run: |
echo "you can't upload debug build to appstore!"
exit 1

- uses: actions/checkout@v3

- run: |
sudo xcode-select -s /Applications/Xcode_${XCODE_VERSION}.app/Contents/Developer
ls

- name: Set version number and build number
run: |
echo "VERSION_NUMBER=${{ steps.regex.outputs.group2 }}.${{ steps.regex.outputs.group3 }}.${{ steps.regex.outputs.group4 }}" >> $GITHUB_ENV
echo "BUILD_NUMBER=${{ steps.regex.outputs.group6 }}" >> $GITHUB_ENV

- name: Install Ruby Dependencies
run: |
bundle install
bundle update fastlane

- name: Setup match repo ssh
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSH_KEY }}
known_hosts: ${{ secrets.KNOWN_HOSTS }}



- name: Inject secret file dependencies
env:
BUNDLE: ${{ secrets.BUNDLE }}
BUNDLE_DEV: ${{secrets.BUNDLE_DEV}}
CONFIG: ${{ secrets.CONFIG }}
GOOGLE_SERVICE_INFO: ${{ secrets.GOOGLE_SERVICE_INFO }}
GOOGLE_SERVICE_INFO_DEV: ${{ secrets.GOOGLE_SERVICE_INFO_DEV }}
run: |
mkdir "Siksha/Supporting Files"
echo "$BUNDLE" > "Siksha/Supporting Files/bundle.xcconfig"
echo "$BUNDLE_DEV" > "Siksha/Supporting Files/bundle-dev.xcconfig"
echo "$CONFIG" > "Siksha/Supporting Files/config.plist"
echo "$GOOGLE_SERVICE_INFO" > "Siksha/Supporting Files/GoogleService-Info.plist"
echo "$GOOGLE_SERVICE_INFO_DEV" > "Siksha/Supporting Files/GoogleService-Info-dev.plist"


- name: Upload prod app to TestFlight
if: ${{ steps.regex.outputs.group1 == 'testflight' && steps.regex.outputs.group5 == 'release' }}
run: |
bundle exec fastlane beta
35 changes: 32 additions & 3 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,43 @@
default_platform(:ios)

platform :ios do
desc "Description of what the lane does"
lane :custom_lane do
desc "Upload app to testflight"
lane :beta do
ENV["FASTLANE_XCODEBUILD_SETTINGS_TIMEOUT"] = "120"
setup_ci
app_store_connect_api_key(
key_id:ENV["APPSTORE_CONNECT_KEY_ID"],
issuer_id:ENV["APPSTORE_CONNECT_ISSUER_ID"],
key_content:ENV["APPSTORE_CONNECT_KEY_CONTENT"]
)

match(
type: "appstore",
app_identifier:ENV["BUNDLE_IDENTIFIER"],
readonly: true
)

update_code_signing_settings(
use_automatic_signing: false,
code_sign_identity: "Apple Distribution",
profile_name:ENV["PROFILE_NAME"],
path:"Siksha.xcodeproj",
bundle_identifier:ENV["BUNDLE_IDENTIFIER"],
targets:"Siksha-Release",
team_id:ENV["TEAM_ID"]
)
build_app(project:"Siksha.xcodeproj",scheme:"Siksha-Release",configuration:"Release",clean:true, silent:true)
increment_build_number(build_number:ENV["BUILD_NUMBER"],xcodeproj:"Siksha.xcodeproj")
upload_to_testflight(app_version:ENV["VERSION_NUMBER"])
slack(message:"uploaded to testflight")
# add actions here: https://docs.fastlane.tools/actions
end


end

lane :register_new_devices do
register_devices(
devices_file: "./devices.txt"
)
end
end
8 changes: 8 additions & 0 deletions fastlane/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ For _fastlane_ installation instructions, see [Installing _fastlane_](https://do



### beta

```sh
[bundle exec] fastlane beta
```



----


Expand Down