From 265fa41945bb271aa97f53415d1d192089beceb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=CC=8Cimon=20S=CC=8Cesta=CC=81k?= Date: Thu, 16 Oct 2025 19:18:07 +0200 Subject: [PATCH 01/20] feat(ios-fastlane): Add GitHub Actions for beta, release, and test workflows Automates Fastlane operations for iOS applications, streamlining CI/CD processes. Also adds *.DS_Store to .gitignore. --- .github/actions/ios-fastlane-beta/action.yml | 27 +++++++++++++++++++ .github/actions/ios-fastlane-beta/beta.sh | 15 +++++++++++ .../actions/ios-fastlane-release/action.yml | 27 +++++++++++++++++++ .../actions/ios-fastlane-release/release.sh | 15 +++++++++++ .github/actions/ios-fastlane-test/action.yml | 15 +++++++++++ .github/actions/ios-fastlane-test/test.sh | 11 ++++++++ .gitignore | 3 ++- 7 files changed, 112 insertions(+), 1 deletion(-) create mode 100644 .github/actions/ios-fastlane-beta/action.yml create mode 100644 .github/actions/ios-fastlane-beta/beta.sh create mode 100644 .github/actions/ios-fastlane-release/action.yml create mode 100644 .github/actions/ios-fastlane-release/release.sh create mode 100644 .github/actions/ios-fastlane-test/action.yml create mode 100644 .github/actions/ios-fastlane-test/test.sh diff --git a/.github/actions/ios-fastlane-beta/action.yml b/.github/actions/ios-fastlane-beta/action.yml new file mode 100644 index 0000000..b93ef34 --- /dev/null +++ b/.github/actions/ios-fastlane-beta/action.yml @@ -0,0 +1,27 @@ +name: 'Fastlane Beta' +description: 'Runs Fastlane beta' +inputs: + match_password: + description: 'Match password' + required: true + testflight_changelog: + description: 'Testflight changelog' + required: false + app_store_connect_api_key_key: + description: 'App Store Connect API Key' + required: true + app_store_connect_api_key_key_id: + description: 'App Store Connect API Key ID' + required: true + app_store_connect_api_key_issuer_id: + description: 'App Store Connect API Key Issuer ID' + required: true + custom_values: + description: 'Custom values' + required: false +runs: + using: 'composite' + steps: + - name: Run beta script + shell: bash + run: ${{ github.action_path }}/beta.sh diff --git a/.github/actions/ios-fastlane-beta/beta.sh b/.github/actions/ios-fastlane-beta/beta.sh new file mode 100644 index 0000000..972609f --- /dev/null +++ b/.github/actions/ios-fastlane-beta/beta.sh @@ -0,0 +1,15 @@ +#!/bin/bash +set -e + +cd iosApp +gem install bundler +bundle install --jobs 4 --retry 3 + +export MATCH_PASSWORD="$INPUT_MATCH_PASSWORD" +export PR_TITLE="$INPUT_TESTFLIGHT_CHANGELOG" +export APP_STORE_CONNECT_API_KEY_KEY="$INPUT_APP_STORE_CONNECT_API_KEY_KEY" +export APP_STORE_CONNECT_API_KEY_KEY_ID="$INPUT_APP_STORE_CONNECT_API_KEY_KEY_ID" +export APP_STORE_CONNECT_API_KEY_ISSUER_ID="$INPUT_APP_STORE_CONNECT_API_KEY_ISSUER_ID" +export CUSTOM_VALUES="$INPUT_CUSTOM_VALUES" + +bundle exec fastlane beta diff --git a/.github/actions/ios-fastlane-release/action.yml b/.github/actions/ios-fastlane-release/action.yml new file mode 100644 index 0000000..901c626 --- /dev/null +++ b/.github/actions/ios-fastlane-release/action.yml @@ -0,0 +1,27 @@ +name: 'Fastlane Release' +description: 'Runs Fastlane release' +inputs: + match_password: + description: 'Match password' + required: true + version_number: + description: 'Version number' + required: false + app_store_connect_api_key_key: + description: 'App Store Connect API Key' + required: true + app_store_connect_api_key_key_id: + description: 'App Store Connect API Key ID' + required: true + app_store_connect_api_key_issuer_id: + description: 'App Store Connect API Key Issuer ID' + required: true + custom_values: + description: 'Custom values' + required: false +runs: + using: 'composite' + steps: + - name: Run release script + shell: bash + run: ${{ github.action_path }}/release.sh diff --git a/.github/actions/ios-fastlane-release/release.sh b/.github/actions/ios-fastlane-release/release.sh new file mode 100644 index 0000000..0c81989 --- /dev/null +++ b/.github/actions/ios-fastlane-release/release.sh @@ -0,0 +1,15 @@ +#!/bin/bash +set -e + +cd iosApp +gem install bundler +bundle install --jobs 4 --retry 3 + +export MATCH_PASSWORD="$INPUT_MATCH_PASSWORD" +export VERSION_NUMBER="$INPUT_VERSION_NUMBER" +export APP_STORE_CONNECT_API_KEY_KEY="$INPUT_APP_STORE_CONNECT_API_KEY_KEY" +export APP_STORE_CONNECT_API_KEY_KEY_ID="$INPUT_APP_STORE_CONNECT_API_KEY_KEY_ID" +export APP_STORE_CONNECT_API_KEY_ISSUER_ID="$INPUT_APP_STORE_CONNECT_API_KEY_ISSUER_ID" +export CUSTOM_VALUES="$INPUT_CUSTOM_VALUES" + +bundle exec fastlane release diff --git a/.github/actions/ios-fastlane-test/action.yml b/.github/actions/ios-fastlane-test/action.yml new file mode 100644 index 0000000..75aa7b4 --- /dev/null +++ b/.github/actions/ios-fastlane-test/action.yml @@ -0,0 +1,15 @@ +name: 'Fastlane Test' +description: 'Runs Fastlane test' +inputs: + github_token: + description: 'GitHub token' + required: true + custom_values: + description: 'Custom values' + required: false +runs: + using: 'composite' + steps: + - name: Run test script + shell: bash + run: ${{ github.action_path }}/test.sh diff --git a/.github/actions/ios-fastlane-test/test.sh b/.github/actions/ios-fastlane-test/test.sh new file mode 100644 index 0000000..52324d9 --- /dev/null +++ b/.github/actions/ios-fastlane-test/test.sh @@ -0,0 +1,11 @@ +#!/bin/bash +set -e + +cd iosApp +gem install bundler +bundle install --jobs 4 --retry 3 + +export DANGER_GITHUB_API_TOKEN="$INPUT_GITHUB_TOKEN" +export CUSTOM_VALUES="$INPUT_CUSTOM_VALUES" + +bundle exec fastlane test diff --git a/.gitignore b/.gitignore index 723ef36..4a6f485 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -.idea \ No newline at end of file +.idea +*.DS_Store From d1087ad953e9e57e3d9464c19446623efb7bac9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=CC=8Cimon=20S=CC=8Cesta=CC=81k?= Date: Thu, 16 Oct 2025 19:49:54 +0200 Subject: [PATCH 02/20] refactor(ios-selfhosted-build): Streamline workflow and introduce dedicated Fastlane action Refactored the Fastlane Beta step into a reusable composite action, removed redundant inputs, and added explicit changelog and timeout inputs for improved flexibility and clarity. --- .github/workflows/ios-selfhosted-build.yml | 196 +++++++++------------ 1 file changed, 86 insertions(+), 110 deletions(-) diff --git a/.github/workflows/ios-selfhosted-build.yml b/.github/workflows/ios-selfhosted-build.yml index 2b4fe14..1f934e7 100644 --- a/.github/workflows/ios-selfhosted-build.yml +++ b/.github/workflows/ios-selfhosted-build.yml @@ -1,154 +1,130 @@ -name: Self-hosted Build +name: iOS Self-hosted Build on: workflow_call: inputs: use_git_lfs: - description: Whether to download Git-LFS files. + description: 'Whether to download Git-LFS files.' type: boolean - required: false default: false custom_values: - description: "Custom string that can contains values specified in your workflow file. Those values will be placed into environment variable. Example: \"CUSTOM-1: 1; CUSTOM-2: 2\"" + description: 'Custom string that can contains values specified in your workflow file. Those values will be placed into environment variable. Example: "CUSTOM-1: 1; CUSTOM-2: 2"' type: string required: false runner_label: description: 'The custom label for the self-hosted runner to use for the build job.' type: string - required: false - default: 'self-hosted' # Default if you don't specify a particular runner - changelog_debug: - description: Enable debug mode for changelog generation. Default is false. - type: boolean - required: false - default: false - changelog_checkout_depth: - description: The depth of the git history to fetch for changelog generation. Default is 100. + default: 'self-hosted' + timeout_minutes: + description: 'Job timeout in minutes' type: number + default: 30 + xcconfig_path: + description: 'Path to the .xcconfig file. Selected secret properties will be appended to the end of this file.' + type: string required: false - default: 100 - changelog_fallback_lookback: - description: The amount of time to look back for merge commits when no previous build commit is found. Default is 24 hours. + secret_properties: + description: 'Secrets in the format KEY = VALUE (one per line).' type: string required: false - default: "24 hours" - force_build: - description: "If true, skip change detection and force a build." - type: boolean + required_keys: + description: 'Comma-separated list of required keys.' + type: string required: false - default: false - xcconfig_path: - description: Path to the .xcconfig file. Selected secret properties will be appended to the end of this file. + changelog: + description: 'Will be used as TestFlight changelog' type: string required: false - default: "" - required_keys: - description: Comma-separated list of required keys. + changelog_fallback_lookback: + description: 'The amount of time to look back for merge commits when no previous build commit is found. Default is 24 hours.' type: string required: false - default: "" + default: '24 hours' + secrets: MATCH_PASSWORD: required: true - description: > - Password for decrypting of certificates and provisioning profiles. + description: 'Password for decrypting of certificates and provisioning profiles.' APP_STORE_CONNECT_API_KEY_KEY: required: true - description: > - Private App Store Connect API key for submitting build to App Store. + description: 'Private App Store Connect API key for submitting build to App Store.' APP_STORE_CONNECT_API_KEY_KEY_ID: required: true - description: > - Private App Store Connect API key for submitting build to App Store. + description: 'Private App Store Connect API key for submitting build to App Store.' APP_STORE_CONNECT_API_KEY_ISSUER_ID: required: true - description: > - Private App Store Connect API issuer key for submitting build to App Store. + description: 'Private App Store Connect API issuer key for submitting build to App Store.' SECRET_PROPERTIES: required: false - description: > - Secrets in the format KEY = VALUE (one per line). + description: 'Secrets in the format KEY = VALUE (one per line).' jobs: - build: runs-on: ${{ fromJson(format('["self-hosted", "{0}"]', inputs.runner_label)) }} - timeout-minutes: 30 + timeout-minutes: ${{ inputs.timeout_minutes }} steps: - - name: Checkout - uses: actions/checkout@v4 - with: - lfs: ${{ inputs.use_git_lfs }} - fetch-depth: ${{ inputs.changelog_checkout_depth }} - - - name: Use Composite Action - Detect changes and get changelog - id: detect_changes - uses: futuredapp/.github/.github/actions/universal-detect-changes-and-generate-changelog@main - with: - debug: ${{ inputs.changelog_debug }} - fallback_lookback: ${{ inputs.changelog_fallback_lookback }} - - - name: Set changelog for forced build - if: ${{ inputs.force_build == true }} - id: changelog - run: | - echo "changelog=Forced build" >> "$GITHUB_OUTPUT" - - - name: Checkout - if: ${{ steps.detect_changes.outputs.skip_build != 'true' && inputs.use_git_lfs == 'true' }} - uses: actions/checkout@v4 - with: - lfs: ${{ inputs.use_git_lfs }} - - - name: Export secrets to .xcconfig file - if: ${{ inputs.xcconfig_path != '' }} - uses: futuredapp/.github/.github/actions/ios-export-secrets@main - with: - XCCONFIG_PATH: ${{ inputs.xcconfig_path }} - SECRET_PROPERTIES: ${{ secrets.SECRET_PROPERTIES }} - REQUIRED_KEYS: ${{ inputs.required_keys }} + - name: Generate changelog if not provided + if: ${{ inputs.changelog == '' }} + id: detect_changes + uses: futuredapp/.github/.github/actions/universal-detect-changes-and-generate-changelog@main + with: + fallback_lookback: ${{ inputs.changelog_fallback_lookback }} + + - name: Checkout + if: ${{ inputs.use_git_lfs == 'true' || inputs.changelog != '' }} + uses: actions/checkout@v4 + with: + lfs: ${{ inputs.use_git_lfs }} - - name: Fastlane Beta - if: ${{ steps.detect_changes.outputs.skip_build != 'true' || inputs.force_build == true }} - run: | - gem install bundler - bundle install --jobs 4 --retry 3 - bundle exec fastlane beta - env: - MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} - PR_TITLE: ${{ steps.detect_changes.outputs.changelog || steps.changelog.outputs.changelog }} - APP_STORE_CONNECT_API_KEY_KEY: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY }} - APP_STORE_CONNECT_API_KEY_KEY_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY_ID }} - APP_STORE_CONNECT_API_KEY_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_ISSUER_ID }} - CUSTOM_VALUES: ${{ inputs.custom_values }} + - name: Set changelog + id: set_changelog + run: | + if [ -n "${{ inputs.changelog }}" ]; then + echo "changelog=${{ inputs.changelog }}" >> $GITHUB_OUTPUT + else + echo "changelog=${{ steps.detect_changes.outputs.changelog }}" >> $GITHUB_OUTPUT + fi - - name: Upload IPA - if: ${{ steps.detect_changes.outputs.skip_build != 'true' || inputs.force_build == true }} - uses: actions/upload-artifact@v4 - with: - name: Build.ipa - path: build_output/*.ipa + - name: Export secrets + if: ${{ inputs.xcconfig_path != '' }} + uses: futuredapp/.github/.github/actions/ios-export-secrets@main + with: + XCCONFIG_PATH: ${{ inputs.xcconfig_path }} + SECRET_PROPERTIES: ${{ secrets.SECRET_PROPERTIES }} + REQUIRED_KEYS: ${{ inputs.required_keys }} - - name: Upload dSYM - if: ${{ steps.detect_changes.outputs.skip_build != 'true' || inputs.force_build == true }} - uses: actions/upload-artifact@v4 - with: - name: Build.app.dSYM.zip - path: build_output/*.app.dSYM.zip + - name: Fastlane Beta + uses: futuredapp/.github/.github/actions/ios-fastlane-beta@main + with: + MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} + testflight_changelog: ${{ steps.set_changelog.outputs.changelog }} + APP_STORE_CONNECT_API_KEY_KEY: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY }} + APP_STORE_CONNECT_API_KEY_KEY_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY_ID }} + APP_STORE_CONNECT_API_KEY_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_ISSUER_ID }} + custom_values: ${{ inputs.custom_values }} - - name: Save latest build commit SHA to file - if: success() && steps.detect_changes.outputs.skip_build != 'true' && inputs.force_build != true - shell: bash - run: | - echo "${{ github.sha }}" > latest_builded_commit.txt - if [ "${{ inputs.changelog_debug }}" == 'true' ]; then - echo "[DEBUG] Saved commit SHA ${{ github.sha }} to latest_builded_commit.txt" - fi + - name: Upload IPA + uses: actions/upload-artifact@v4 + with: + name: Build.ipa + path: build_output/*.ipa - - name: Store latest build commit SHA in cache - if: success() && steps.detect_changes.outputs.skip_build != 'true' && inputs.force_build != true - uses: actions/cache/save@v4 - with: - path: latest_builded_commit.txt - key: ${{ steps.detect_changes.outputs.cache_key }} + - name: Upload dSYM + uses: actions/upload-artifact@v4 + with: + name: Build.app.dSYM.zip + path: build_output/*.app.dSYM.zip + + - name: Save latest build commit SHA to file + if: success() + shell: bash + run: | + echo "${{ github.sha }}" > latest_builded_commit.txt + + - name: Store latest build commit SHA in cache + if: success() + uses: actions/cache/save@v4 + with: + path: latest_builded_commit.txt + key: ${{ steps.detect_changes.outputs.cache_key }} \ No newline at end of file From 71656d8405341a13f09ce48561fe2571b0a5b53e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=CC=8Cimon=20S=CC=8Cesta=CC=81k?= Date: Thu, 16 Oct 2025 19:55:44 +0200 Subject: [PATCH 03/20] ci(ios-selfhosted-test): Refactor to use `ios-fastlane-test` action and add Danger token Refactor the Fastlane test step to use the `ios-fastlane-test` reusable action for improved maintainability. Introduce a dedicated `GITHUB_TOKEN_DANGER` secret for Danger integration and add a configurable `timeout_minutes` input. --- .github/workflows/ios-selfhosted-test.yml | 42 +++++++++++++---------- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/.github/workflows/ios-selfhosted-test.yml b/.github/workflows/ios-selfhosted-test.yml index 702a821..a54bcba 100644 --- a/.github/workflows/ios-selfhosted-test.yml +++ b/.github/workflows/ios-selfhosted-test.yml @@ -1,23 +1,29 @@ -name: Self-hosted Test +name: iOS Self-hosted Test on: workflow_call: inputs: use_git_lfs: - description: Whether to download Git-LFS files. + description: 'Whether to download Git-LFS files.' type: boolean - required: false default: false custom_values: - description: "Custom string that can contains values specified in your workflow file. Those values will be placed into environment variable. Example: \"CUSTOM-1: 1; CUSTOM-2: 2\"" + description: 'Custom string that can contains values specified in your workflow file. Those values will be placed into environment variable. Example: "CUSTOM-1: 1; CUSTOM-2: 2"' type: string required: false runner_label: description: 'The custom label for the self-hosted runner to use for the build job.' type: string - required: false - default: 'self-hosted' # Default if you don't specify a particular runner + default: 'self-hosted' + timeout_minutes: + description: 'Job timeout in minutes' + type: number + default: 30 + secrets: + GITHUB_TOKEN_DANGER: + required: true + description: 'GitHub token for Danger. Must have permissions to read and write issues and pull requests.' concurrency: group: ${{ github.workflow }}-${{ github.head_ref }} @@ -26,18 +32,16 @@ concurrency: jobs: test: runs-on: ${{ fromJson(format('["self-hosted", "{0}"]', inputs.runner_label)) }} - timeout-minutes: 30 + timeout-minutes: ${{ inputs.timeout_minutes }} steps: - - name: Checkout - uses: actions/checkout@v4 - with: - lfs: ${{ inputs.use_git_lfs }} - - name: Fastlane Test - run: | - gem install bundler - bundle install --jobs 4 --retry 3 - bundle exec fastlane test - env: - DANGER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} - CUSTOM_VALUES: ${{ inputs.custom_values }} + - name: Checkout + uses: actions/checkout@v4 + with: + lfs: ${{ inputs.use_git_lfs }} + + - name: Fastlane Test + uses: futuredapp/.github/.github/actions/ios-fastlane-test@main + with: + github_token: ${{ secrets.GITHUB_TOKEN_DANGER }} + custom_values: ${{ inputs.custom_values }} \ No newline at end of file From d6a715967b98b43a8704ae5a2739265392f75bc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=CC=8Cimon=20S=CC=8Cesta=CC=81k?= Date: Thu, 16 Oct 2025 20:00:47 +0200 Subject: [PATCH 04/20] refactor(ios-release): Use dedicated action for Fastlane release Extracts the Fastlane release logic into a reusable GitHub Action for improved modularity and maintainability. Also introduces a configurable 'timeout_minutes' input for the job. --- .github/workflows/ios-selfhosted-release.yml | 109 ++++++++++--------- 1 file changed, 55 insertions(+), 54 deletions(-) diff --git a/.github/workflows/ios-selfhosted-release.yml b/.github/workflows/ios-selfhosted-release.yml index e9cab24..c0b462b 100644 --- a/.github/workflows/ios-selfhosted-release.yml +++ b/.github/workflows/ios-selfhosted-release.yml @@ -1,90 +1,91 @@ -name: Self-hosted Release +name: iOS Self-hosted Release on: workflow_call: inputs: use_git_lfs: - description: Whether to download Git-LFS files. + description: 'Whether to download Git-LFS files.' type: boolean - required: false default: false custom_values: - description: "Custom string that can contains values specified in your workflow file. Those values will be placed into environment variable. Example: \"CUSTOM-1: 1; CUSTOM-2: 2\"" + description: 'Custom string that can contains values specified in your workflow file. Those values will be placed into environment variable. Example: "CUSTOM-1: 1; CUSTOM-2: 2"' type: string required: false runner_label: description: 'The custom label for the self-hosted runner to use for the build job.' type: string - required: false - default: 'self-hosted' # Default if you don't specify a particular runner + default: 'self-hosted' + timeout_minutes: + description: 'Job timeout in minutes' + type: number + default: 30 xcconfig_path: - description: Path to the .xcconfig file. Selected secret properties will be appended to the end of this file. + description: 'Path to the .xcconfig file. Selected secret properties will be appended to the end of this file.' + type: string + required: false + secret_properties: + description: 'Secrets in the format KEY = VALUE (one per line).' type: string required: false - default: "" required_keys: - description: Comma-separated list of required keys. + description: 'Comma-separated list of required keys.' type: string required: false - default: "" + secrets: MATCH_PASSWORD: required: true - description: > - Password for decrypting of certificates and provisioning profiles. + description: 'Password for decrypting of certificates and provisioning profiles.' APP_STORE_CONNECT_API_KEY_KEY: required: true - description: > - Private App Store Connect API key for submitting build to App Store. + description: 'Private App Store Connect API key for submitting build to App Store.' APP_STORE_CONNECT_API_KEY_KEY_ID: required: true - description: > - Private App Store Connect API key for submitting build to App Store. + description: 'Private App Store Connect API key for submitting build to App Store.' APP_STORE_CONNECT_API_KEY_ISSUER_ID: required: true - description: > - Private App Store Connect API issuer key for submitting build to App Store. + description: 'Private App Store Connect API issuer key for submitting build to App Store.' SECRET_PROPERTIES: required: false - description: > - Secrets in the format KEY = VALUE (one per line). + description: 'Secrets in the format KEY = VALUE (one per line).' jobs: release: runs-on: ${{ fromJson(format('["self-hosted", "{0}"]', inputs.runner_label)) }} - timeout-minutes: 30 + timeout-minutes: ${{ inputs.timeout_minutes }} steps: - - name: Checkout - uses: actions/checkout@v4 - with: - lfs: ${{ inputs.use_git_lfs }} - - name: Export secrets to .xcconfig file - if: ${{ inputs.xcconfig_path != '' }} - uses: futuredapp/.github/.github/actions/ios-export-secrets@main - with: - XCCONFIG_PATH: ${{ inputs.xcconfig_path }} - SECRET_PROPERTIES: ${{ secrets.SECRET_PROPERTIES }} - REQUIRED_KEYS: ${{ inputs.required_keys }} - - name: Fastlane Release - run: | - gem install bundler - bundle install --jobs 4 --retry 3 - bundle exec fastlane release - env: - MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} - VERSION_NUMBER: ${{ github.ref_name }} - APP_STORE_CONNECT_API_KEY_KEY: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY }} - APP_STORE_CONNECT_API_KEY_KEY_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY_ID }} - APP_STORE_CONNECT_API_KEY_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_ISSUER_ID }} - CUSTOM_VALUES: ${{ inputs.custom_values }} - - name: Upload IPA - uses: actions/upload-artifact@v4 - with: - name: Build.ipa - path: build_output/*.ipa - - name: Upload dSYM - uses: actions/upload-artifact@v4 - with: - name: Build.app.dSYM.zip - path: build_output/*.app.dSYM.zip + - name: Checkout + uses: actions/checkout@v4 + with: + lfs: ${{ inputs.use_git_lfs }} + + - name: Export secrets + if: ${{ inputs.xcconfig_path != '' }} + uses: futuredapp/.github/.github/actions/ios-export-secrets@main + with: + XCCONFIG_PATH: ${{ inputs.xcconfig_path }} + SECRET_PROPERTIES: ${{ secrets.SECRET_PROPERTIES }} + REQUIRED_KEYS: ${{ inputs.required_keys }} + + - name: Fastlane Release + uses: futuredapp/.github/.github/actions/ios-fastlane-release@main + with: + match_password: ${{ secrets.MATCH_PASSWORD }} + version_number: ${{ github.ref_name }} + app_store_connect_api_key_key: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY }} + app_store_connect_api_key_key_id: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY_ID }} + app_store_connect_api_key_issuer_id: ${{ secrets.APP_STORE_CONNECT_API_KEY_ISSUER_ID }} + custom_values: ${{ inputs.custom_values }} + + - name: Upload IPA + uses: actions/upload-artifact@v4 + with: + name: Build.ipa + path: build_output/*.ipa + + - name: Upload dSYM + uses: actions/upload-artifact@v4 + with: + name: Build.app.dSYM.zip + path: build_output/*.app.dSYM.zip \ No newline at end of file From 83640f9170d771344cac3609f4486363a63c4a38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=CC=8Cimon=20S=CC=8Cesta=CC=81k?= Date: Thu, 16 Oct 2025 20:22:03 +0200 Subject: [PATCH 05/20] feat: add iOS self-hosted nightly build workflow This workflow automates the nightly build process for iOS applications using self-hosted GitHub Actions runners, including changelog generation, secret export, Fastlane Beta deployment, and artifact uploads. --- .../workflows/ios-selfhosted-nightlyBuild.yml | 124 ++++++++++++++++++ 1 file changed, 124 insertions(+) create mode 100644 .github/workflows/ios-selfhosted-nightlyBuild.yml diff --git a/.github/workflows/ios-selfhosted-nightlyBuild.yml b/.github/workflows/ios-selfhosted-nightlyBuild.yml new file mode 100644 index 0000000..29f2c34 --- /dev/null +++ b/.github/workflows/ios-selfhosted-nightlyBuild.yml @@ -0,0 +1,124 @@ +name: iOS Self-hosted Nightly Build + +on: + workflow_call: + inputs: + use_git_lfs: + description: 'Whether to download Git-LFS files.' + type: boolean + default: false + custom_values: + description: 'Custom string that can contains values specified in your workflow file. Those values will be placed into environment variable. Example: "CUSTOM-1: 1; CUSTOM-2: 2"' + type: string + required: false + runner_label: + description: 'The custom label for the self-hosted runner to use for the build job.' + type: string + default: 'self-hosted' + timeout_minutes: + description: 'Job timeout in minutes' + type: number + default: 30 + xcconfig_path: + description: 'Path to the .xcconfig file. Selected secret properties will be appended to the end of this file.' + type: string + required: false + secret_properties: + description: 'Secrets in the format KEY = VALUE (one per line).' + type: string + required: false + required_keys: + description: 'Comma-separated list of required keys.' + type: string + required: false + changelog_fallback_lookback: + description: 'The amount of time to look back for merge commits when no previous build commit is found. Default is 24 hours.' + type: string + required: false + default: '24 hours' + + secrets: + MATCH_PASSWORD: + required: true + description: 'Password for decrypting of certificates and provisioning profiles.' + APP_STORE_CONNECT_API_KEY_KEY: + required: true + description: 'Private App Store Connect API key for submitting build to App Store.' + APP_STORE_CONNECT_API_KEY_KEY_ID: + required: true + description: 'Private App Store Connect API key for submitting build to App Store.' + APP_STORE_CONNECT_API_KEY_ISSUER_ID: + required: true + description: 'Private App Store Connect API issuer key for submitting build to App Store.' + SECRET_PROPERTIES: + required: false + description: 'Secrets in the format KEY = VALUE (one per line).' + +jobs: + build: + runs-on: ${{ fromJson(format('["self-hosted", "{0}"]', inputs.runner_label)) }} + timeout-minutes: ${{ inputs.timeout_minutes }} + + steps: + - name: Detect changes and generate changelog + id: detect_changes + uses: futuredapp/.github/.github/actions/universal-detect-changes-and-generate-changelog@main + with: + fallback_lookback: ${{ inputs.changelog_fallback_lookback }} + + - name: Checkout + if: ${{ inputs.use_git_lfs == 'true' }} + uses: actions/checkout@v4 + with: + lfs: ${{ inputs.use_git_lfs }} + + - name: Set changelog + id: set_changelog + run: | + echo "changelog=${{ steps.detect_changes.outputs.changelog }}" >> $GITHUB_OUTPUT + + - name: Export secrets + if: ${{ steps.detect_changes.outputs.skip_build == 'false' && inputs.xcconfig_path != '' }} + uses: futuredapp/.github/.github/actions/ios-export-secrets@main + with: + XCCONFIG_PATH: ${{ inputs.xcconfig_path }} + SECRET_PROPERTIES: ${{ secrets.SECRET_PROPERTIES }} + REQUIRED_KEYS: ${{ inputs.required_keys }} + + - name: Fastlane Beta + if: ${{ steps.detect_changes.outputs.skip_build == 'false' }} + uses: ./.github/actions/ios-fastlane-beta + with: + MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} + testflight_changelog: ${{ steps.set_changelog.outputs.changelog }} + APP_STORE_CONNECT_API_KEY_KEY: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY }} + APP_STORE_CONNECT_API_KEY_KEY_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY_ID }} + APP_STORE_CONNECT_API_KEY_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_ISSUER_ID }} + custom_values: ${{ inputs.custom_values }} + + - name: Upload IPA + if: ${{ steps.detect_changes.outputs.skip_build == 'false' }} + uses: actions/upload-artifact@v4 + with: + name: Build.ipa + path: build_output/*.ipa + + - name: Upload dSYM + if: ${{ steps.detect_changes.outputs.skip_build == 'false' }} + uses: actions/upload-artifact@v4 + with: + name: Build.app.dSYM.zip + path: build_output/*.app.dSYM.zip + + - name: Save latest build commit SHA to file + if: ${{ success() && steps.detect_changes.outputs.skip_build == 'false' }} + shell: bash + run: | + echo "${{ github.sha }}" > latest_builded_commit.txt + + - name: Store latest build commit SHA in cache + if: ${{ success() && steps.detect_changes.outputs.skip_build == 'false' }} + uses: actions/cache/save@v4 + with: + path: latest_builded_commit.txt + key: ${{ steps.detect_changes.outputs.cache_key }} From 7255c554d51f35501c35bd75cfa22e65981d02ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=CC=8Cimon=20S=CC=8Cesta=CC=81k?= Date: Fri, 17 Oct 2025 10:54:53 +0200 Subject: [PATCH 06/20] ci(ios-nightly-build): Optimize workflow execution and update action reference Conditionally skips build-related steps based on change detection output and updates the 'ios-fastlane-beta' action to use a centralized reference. --- .github/workflows/ios-selfhosted-nightlyBuild.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ios-selfhosted-nightlyBuild.yml b/.github/workflows/ios-selfhosted-nightlyBuild.yml index 29f2c34..30af163 100644 --- a/.github/workflows/ios-selfhosted-nightlyBuild.yml +++ b/.github/workflows/ios-selfhosted-nightlyBuild.yml @@ -67,12 +67,13 @@ jobs: fallback_lookback: ${{ inputs.changelog_fallback_lookback }} - name: Checkout - if: ${{ inputs.use_git_lfs == 'true' }} + if: ${{ steps.detect_changes.outputs.skip_build == 'false' && inputs.use_git_lfs == 'true' }} uses: actions/checkout@v4 with: lfs: ${{ inputs.use_git_lfs }} - name: Set changelog + if: ${{ steps.detect_changes.outputs.skip_build == 'false' }} id: set_changelog run: | echo "changelog=${{ steps.detect_changes.outputs.changelog }}" >> $GITHUB_OUTPUT @@ -87,7 +88,7 @@ jobs: - name: Fastlane Beta if: ${{ steps.detect_changes.outputs.skip_build == 'false' }} - uses: ./.github/actions/ios-fastlane-beta + uses: futuredapp/.github/.github/actions/ios-fastlane-beta@main with: MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} testflight_changelog: ${{ steps.set_changelog.outputs.changelog }} @@ -111,13 +112,13 @@ jobs: path: build_output/*.app.dSYM.zip - name: Save latest build commit SHA to file - if: ${{ success() && steps.detect_changes.outputs.skip_build == 'false' }} + if: success() && steps.detect_changes.outputs.skip_build == 'false' shell: bash run: | echo "${{ github.sha }}" > latest_builded_commit.txt - name: Store latest build commit SHA in cache - if: ${{ success() && steps.detect_changes.outputs.skip_build == 'false' }} + if: success() && steps.detect_changes.outputs.skip_build == 'false' uses: actions/cache/save@v4 with: path: latest_builded_commit.txt From b698cf8675f23cb44763ce0e5c75f1fd59305c7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=CC=8Cimon=20S=CC=8Cesta=CC=81k?= Date: Fri, 17 Oct 2025 11:09:53 +0200 Subject: [PATCH 07/20] fix: Pass action inputs as environment variables to Fastlane scripts Fastlane scripts in iOS beta, release, and test actions were not receiving necessary input parameters, leading to failures or incorrect behavior. --- .github/actions/ios-fastlane-beta/action.yml | 7 +++++++ .github/actions/ios-fastlane-release/action.yml | 7 +++++++ .github/actions/ios-fastlane-test/action.yml | 3 +++ 3 files changed, 17 insertions(+) diff --git a/.github/actions/ios-fastlane-beta/action.yml b/.github/actions/ios-fastlane-beta/action.yml index b93ef34..742ab18 100644 --- a/.github/actions/ios-fastlane-beta/action.yml +++ b/.github/actions/ios-fastlane-beta/action.yml @@ -25,3 +25,10 @@ runs: - name: Run beta script shell: bash run: ${{ github.action_path }}/beta.sh + env: + INPUT_MATCH_PASSWORD: ${{ inputs.match_password }} + INPUT_TESTFLIGHT_CHANGELOG: ${{ inputs.testflight_changelog }} + INPUT_APP_STORE_CONNECT_API_KEY_KEY: ${{ inputs.app_store_connect_api_key_key }} + INPUT_APP_STORE_CONNECT_API_KEY_KEY_ID: ${{ inputs.app_store_connect_api_key_key_id }} + INPUT_APP_STORE_CONNECT_API_KEY_ISSUER_ID: ${{ inputs.app_store_connect_api_key_issuer_id }} + INPUT_CUSTOM_VALUES: ${{ inputs.custom_values }} diff --git a/.github/actions/ios-fastlane-release/action.yml b/.github/actions/ios-fastlane-release/action.yml index 901c626..dbe9d20 100644 --- a/.github/actions/ios-fastlane-release/action.yml +++ b/.github/actions/ios-fastlane-release/action.yml @@ -25,3 +25,10 @@ runs: - name: Run release script shell: bash run: ${{ github.action_path }}/release.sh + env: + INPUT_MATCH_PASSWORD: ${{ inputs.match_password }} + INPUT_VERSION_NUMBER: ${{ inputs.version_number }} + INPUT_APP_STORE_CONNECT_API_KEY_KEY: ${{ inputs.app_store_connect_api_key_key }} + INPUT_APP_STORE_CONNECT_API_KEY_KEY_ID: ${{ inputs.app_store_connect_api_key_key_id }} + INPUT_APP_STORE_CONNECT_API_KEY_ISSUER_ID: ${{ inputs.app_store_connect_api_key_issuer_id }} + INPUT_CUSTOM_VALUES: ${{ inputs.custom_values }} diff --git a/.github/actions/ios-fastlane-test/action.yml b/.github/actions/ios-fastlane-test/action.yml index 75aa7b4..99562e0 100644 --- a/.github/actions/ios-fastlane-test/action.yml +++ b/.github/actions/ios-fastlane-test/action.yml @@ -13,3 +13,6 @@ runs: - name: Run test script shell: bash run: ${{ github.action_path }}/test.sh + env: + INPUT_GITHUB_TOKEN: ${{ inputs.github_token }} + INPUT_CUSTOM_VALUES: ${{ inputs.custom_values }} From be5d9c87368e46b234752a5ecf96dfc78df2e8ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=CC=8Cimon=20S=CC=8Cesta=CC=81k?= Date: Fri, 17 Oct 2025 11:11:33 +0200 Subject: [PATCH 08/20] refactor(ios-kmp-build): Use ios-fastlane-beta action for Fastlane Beta step Replaced inline shell commands with a dedicated GitHub Action to improve maintainability and reusability. --- .github/actions/ios-kmp-build/action.yml | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/.github/actions/ios-kmp-build/action.yml b/.github/actions/ios-kmp-build/action.yml index d556454..de79e5d 100644 --- a/.github/actions/ios-kmp-build/action.yml +++ b/.github/actions/ios-kmp-build/action.yml @@ -62,18 +62,14 @@ runs: make build - name: Fastlane Beta working-directory: iosApp - shell: bash - run: | - gem install bundler - bundle install --jobs 4 --retry 3 - bundle exec fastlane beta - env: - MATCH_PASSWORD: ${{ inputs.match_password }} - PR_TITLE: ${{ inputs.testflight_changelog }} - APP_STORE_CONNECT_API_KEY_KEY: ${{ inputs.app_store_connect_api_key_key }} - APP_STORE_CONNECT_API_KEY_KEY_ID: ${{ inputs.app_store_connect_api_key_key_id }} - APP_STORE_CONNECT_API_KEY_ISSUER_ID: ${{ inputs.app_store_connect_api_key_issuer_id }} - CUSTOM_VALUES: ${{ inputs.custom_values }} + uses: futuredapp/.github/.github/actions/ios-fastlane-beta@main + with: + match_password: ${{ inputs.match_password }} + testflight_changelog: ${{ inputs.testflight_changelog }} + app_store_connect_api_key_key: ${{ inputs.app_store_connect_api_key_key }} + app_store_connect_api_key_key_id: ${{ inputs.app_store_connect_api_key_key_id }} + app_store_connect_api_key_issuer_id: ${{ inputs.app_store_connect_api_key_issuer_id }} + custom_values: ${{ inputs.custom_values }} - name: Upload IPA uses: actions/upload-artifact@v4 with: From 63d258aab702fcd878831ef2723c0e957c60ecec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=CC=8Cimon=20S=CC=8Cesta=CC=81k?= Date: Fri, 17 Oct 2025 11:44:14 +0200 Subject: [PATCH 09/20] chore: Temporarily switch iOS workflows to refactor branch This commit temporarily updates the iOS workflows to use the 'feature/refactor-iOS-workflows' branch for Fastlane actions. This change must be reverted before merging into the main branch. --- .github/actions/ios-kmp-build/action.yml | 2 +- .github/workflows/ios-selfhosted-build.yml | 2 +- .github/workflows/ios-selfhosted-nightlyBuild.yml | 2 +- .github/workflows/ios-selfhosted-release.yml | 2 +- .github/workflows/ios-selfhosted-test.yml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/actions/ios-kmp-build/action.yml b/.github/actions/ios-kmp-build/action.yml index de79e5d..67bdd07 100644 --- a/.github/actions/ios-kmp-build/action.yml +++ b/.github/actions/ios-kmp-build/action.yml @@ -62,7 +62,7 @@ runs: make build - name: Fastlane Beta working-directory: iosApp - uses: futuredapp/.github/.github/actions/ios-fastlane-beta@main + uses: futuredapp/.github/.github/actions/ios-fastlane-beta@feature/refactor-iOS-workflows with: match_password: ${{ inputs.match_password }} testflight_changelog: ${{ inputs.testflight_changelog }} diff --git a/.github/workflows/ios-selfhosted-build.yml b/.github/workflows/ios-selfhosted-build.yml index 1f934e7..477212f 100644 --- a/.github/workflows/ios-selfhosted-build.yml +++ b/.github/workflows/ios-selfhosted-build.yml @@ -95,7 +95,7 @@ jobs: REQUIRED_KEYS: ${{ inputs.required_keys }} - name: Fastlane Beta - uses: futuredapp/.github/.github/actions/ios-fastlane-beta@main + uses: futuredapp/.github/.github/actions/ios-fastlane-beta@feature/refactor-iOS-workflows with: MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} testflight_changelog: ${{ steps.set_changelog.outputs.changelog }} diff --git a/.github/workflows/ios-selfhosted-nightlyBuild.yml b/.github/workflows/ios-selfhosted-nightlyBuild.yml index 30af163..09aae77 100644 --- a/.github/workflows/ios-selfhosted-nightlyBuild.yml +++ b/.github/workflows/ios-selfhosted-nightlyBuild.yml @@ -88,7 +88,7 @@ jobs: - name: Fastlane Beta if: ${{ steps.detect_changes.outputs.skip_build == 'false' }} - uses: futuredapp/.github/.github/actions/ios-fastlane-beta@main + uses: futuredapp/.github/.github/actions/ios-fastlane-beta@feature/refactor-iOS-workflows with: MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} testflight_changelog: ${{ steps.set_changelog.outputs.changelog }} diff --git a/.github/workflows/ios-selfhosted-release.yml b/.github/workflows/ios-selfhosted-release.yml index c0b462b..64bb1a3 100644 --- a/.github/workflows/ios-selfhosted-release.yml +++ b/.github/workflows/ios-selfhosted-release.yml @@ -69,7 +69,7 @@ jobs: REQUIRED_KEYS: ${{ inputs.required_keys }} - name: Fastlane Release - uses: futuredapp/.github/.github/actions/ios-fastlane-release@main + uses: futuredapp/.github/.github/actions/ios-fastlane-release@feature/refactor-iOS-workflows with: match_password: ${{ secrets.MATCH_PASSWORD }} version_number: ${{ github.ref_name }} diff --git a/.github/workflows/ios-selfhosted-test.yml b/.github/workflows/ios-selfhosted-test.yml index a54bcba..c4060bc 100644 --- a/.github/workflows/ios-selfhosted-test.yml +++ b/.github/workflows/ios-selfhosted-test.yml @@ -41,7 +41,7 @@ jobs: lfs: ${{ inputs.use_git_lfs }} - name: Fastlane Test - uses: futuredapp/.github/.github/actions/ios-fastlane-test@main + uses: futuredapp/.github/.github/actions/ios-fastlane-test@feature/refactor-iOS-workflows with: github_token: ${{ secrets.GITHUB_TOKEN_DANGER }} custom_values: ${{ inputs.custom_values }} \ No newline at end of file From 8b78f454f83d307a1b97c53b55e11716b5875cf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=CC=8Cimon=20S=CC=8Cesta=CC=81k?= Date: Fri, 17 Oct 2025 11:49:37 +0200 Subject: [PATCH 10/20] fix: Add execute permissions to bash scripts and add refactor plan --- .github/actions/ios-fastlane-beta/beta.sh | 0 .github/actions/ios-fastlane-release/release.sh | 0 .github/actions/ios-fastlane-test/test.sh | 0 3 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 .github/actions/ios-fastlane-beta/beta.sh mode change 100644 => 100755 .github/actions/ios-fastlane-release/release.sh mode change 100644 => 100755 .github/actions/ios-fastlane-test/test.sh diff --git a/.github/actions/ios-fastlane-beta/beta.sh b/.github/actions/ios-fastlane-beta/beta.sh old mode 100644 new mode 100755 diff --git a/.github/actions/ios-fastlane-release/release.sh b/.github/actions/ios-fastlane-release/release.sh old mode 100644 new mode 100755 diff --git a/.github/actions/ios-fastlane-test/test.sh b/.github/actions/ios-fastlane-test/test.sh old mode 100644 new mode 100755 From 41c787fbc88adaab4d1e05700a0cb6e2319591d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=CC=8Cimon=20S=CC=8Cesta=CC=81k?= Date: Fri, 17 Oct 2025 12:07:56 +0200 Subject: [PATCH 11/20] chore(ios-fastlane): Remove redundant `cd iosApp` from Fastlane scripts The working directory for these actions is now configured at the workflow level, making the explicit `cd iosApp` command unnecessary and potentially problematic. --- .github/actions/ios-fastlane-beta/beta.sh | 1 - .github/actions/ios-fastlane-release/release.sh | 1 - .github/actions/ios-fastlane-test/test.sh | 1 - 3 files changed, 3 deletions(-) diff --git a/.github/actions/ios-fastlane-beta/beta.sh b/.github/actions/ios-fastlane-beta/beta.sh index 972609f..316f9b7 100755 --- a/.github/actions/ios-fastlane-beta/beta.sh +++ b/.github/actions/ios-fastlane-beta/beta.sh @@ -1,7 +1,6 @@ #!/bin/bash set -e -cd iosApp gem install bundler bundle install --jobs 4 --retry 3 diff --git a/.github/actions/ios-fastlane-release/release.sh b/.github/actions/ios-fastlane-release/release.sh index 0c81989..f04ba8d 100755 --- a/.github/actions/ios-fastlane-release/release.sh +++ b/.github/actions/ios-fastlane-release/release.sh @@ -1,7 +1,6 @@ #!/bin/bash set -e -cd iosApp gem install bundler bundle install --jobs 4 --retry 3 diff --git a/.github/actions/ios-fastlane-test/test.sh b/.github/actions/ios-fastlane-test/test.sh index 52324d9..0a30e29 100755 --- a/.github/actions/ios-fastlane-test/test.sh +++ b/.github/actions/ios-fastlane-test/test.sh @@ -1,7 +1,6 @@ #!/bin/bash set -e -cd iosApp gem install bundler bundle install --jobs 4 --retry 3 From 749505856a3a2ad4f9d83fce58ac28bc4d18f6c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=CC=8Cimon=20S=CC=8Cesta=CC=81k?= Date: Fri, 24 Oct 2025 15:12:16 +0200 Subject: [PATCH 12/20] Revert "chore: Temporarily switch iOS workflows to refactor branch" This reverts commit 63d258aab702fcd878831ef2723c0e957c60ecec. --- .github/actions/ios-kmp-build/action.yml | 2 +- .github/workflows/ios-selfhosted-build.yml | 2 +- .github/workflows/ios-selfhosted-nightlyBuild.yml | 2 +- .github/workflows/ios-selfhosted-release.yml | 2 +- .github/workflows/ios-selfhosted-test.yml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/actions/ios-kmp-build/action.yml b/.github/actions/ios-kmp-build/action.yml index 67bdd07..de79e5d 100644 --- a/.github/actions/ios-kmp-build/action.yml +++ b/.github/actions/ios-kmp-build/action.yml @@ -62,7 +62,7 @@ runs: make build - name: Fastlane Beta working-directory: iosApp - uses: futuredapp/.github/.github/actions/ios-fastlane-beta@feature/refactor-iOS-workflows + uses: futuredapp/.github/.github/actions/ios-fastlane-beta@main with: match_password: ${{ inputs.match_password }} testflight_changelog: ${{ inputs.testflight_changelog }} diff --git a/.github/workflows/ios-selfhosted-build.yml b/.github/workflows/ios-selfhosted-build.yml index 477212f..1f934e7 100644 --- a/.github/workflows/ios-selfhosted-build.yml +++ b/.github/workflows/ios-selfhosted-build.yml @@ -95,7 +95,7 @@ jobs: REQUIRED_KEYS: ${{ inputs.required_keys }} - name: Fastlane Beta - uses: futuredapp/.github/.github/actions/ios-fastlane-beta@feature/refactor-iOS-workflows + uses: futuredapp/.github/.github/actions/ios-fastlane-beta@main with: MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} testflight_changelog: ${{ steps.set_changelog.outputs.changelog }} diff --git a/.github/workflows/ios-selfhosted-nightlyBuild.yml b/.github/workflows/ios-selfhosted-nightlyBuild.yml index 09aae77..30af163 100644 --- a/.github/workflows/ios-selfhosted-nightlyBuild.yml +++ b/.github/workflows/ios-selfhosted-nightlyBuild.yml @@ -88,7 +88,7 @@ jobs: - name: Fastlane Beta if: ${{ steps.detect_changes.outputs.skip_build == 'false' }} - uses: futuredapp/.github/.github/actions/ios-fastlane-beta@feature/refactor-iOS-workflows + uses: futuredapp/.github/.github/actions/ios-fastlane-beta@main with: MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} testflight_changelog: ${{ steps.set_changelog.outputs.changelog }} diff --git a/.github/workflows/ios-selfhosted-release.yml b/.github/workflows/ios-selfhosted-release.yml index 64bb1a3..c0b462b 100644 --- a/.github/workflows/ios-selfhosted-release.yml +++ b/.github/workflows/ios-selfhosted-release.yml @@ -69,7 +69,7 @@ jobs: REQUIRED_KEYS: ${{ inputs.required_keys }} - name: Fastlane Release - uses: futuredapp/.github/.github/actions/ios-fastlane-release@feature/refactor-iOS-workflows + uses: futuredapp/.github/.github/actions/ios-fastlane-release@main with: match_password: ${{ secrets.MATCH_PASSWORD }} version_number: ${{ github.ref_name }} diff --git a/.github/workflows/ios-selfhosted-test.yml b/.github/workflows/ios-selfhosted-test.yml index c4060bc..a54bcba 100644 --- a/.github/workflows/ios-selfhosted-test.yml +++ b/.github/workflows/ios-selfhosted-test.yml @@ -41,7 +41,7 @@ jobs: lfs: ${{ inputs.use_git_lfs }} - name: Fastlane Test - uses: futuredapp/.github/.github/actions/ios-fastlane-test@feature/refactor-iOS-workflows + uses: futuredapp/.github/.github/actions/ios-fastlane-test@main with: github_token: ${{ secrets.GITHUB_TOKEN_DANGER }} custom_values: ${{ inputs.custom_values }} \ No newline at end of file From e3e9e0f7f8afcb1fed79a0e230d74de1f31e15da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=CC=8Cimon=20S=CC=8Cesta=CC=81k?= Date: Fri, 24 Oct 2025 15:21:04 +0200 Subject: [PATCH 13/20] refactor(workflow): rename ios-selfhosted-nightlyBuild.yml to use hyphens Standardize workflow file naming convention. --- ...lfhosted-nightlyBuild.yml => ios-selfhosted-nightly-build.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{ios-selfhosted-nightlyBuild.yml => ios-selfhosted-nightly-build.yml} (100%) diff --git a/.github/workflows/ios-selfhosted-nightlyBuild.yml b/.github/workflows/ios-selfhosted-nightly-build.yml similarity index 100% rename from .github/workflows/ios-selfhosted-nightlyBuild.yml rename to .github/workflows/ios-selfhosted-nightly-build.yml From f255e12d04d5a1e45dbd550caeddb99120f5841c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=CC=8Cimon=20S=CC=8Cesta=CC=81k?= Date: Fri, 24 Oct 2025 15:26:15 +0200 Subject: [PATCH 14/20] refactor(ci): Deprecate ios-selfhosted-build.yml and introduce ios-selfhosted-on-demand-build.yml Moved the original build logic from `ios-selfhosted-build.yml` to `ios-selfhosted-on-demand-build.yml` to distinguish on-demand builds. The `ios-selfhosted-build.yml` now calls `ios-selfhosted-nightly-build.yml`. --- .github/workflows/ios-selfhosted-build.yml | 90 +++--------- .../ios-selfhosted-on-demand-build.yml | 130 ++++++++++++++++++ 2 files changed, 147 insertions(+), 73 deletions(-) create mode 100644 .github/workflows/ios-selfhosted-on-demand-build.yml diff --git a/.github/workflows/ios-selfhosted-build.yml b/.github/workflows/ios-selfhosted-build.yml index 1f934e7..578285b 100644 --- a/.github/workflows/ios-selfhosted-build.yml +++ b/.github/workflows/ios-selfhosted-build.yml @@ -1,4 +1,4 @@ -name: iOS Self-hosted Build +name: Deprecated Build (use ios-selfhosted-nightly-build) on: workflow_call: @@ -31,10 +31,6 @@ on: description: 'Comma-separated list of required keys.' type: string required: false - changelog: - description: 'Will be used as TestFlight changelog' - type: string - required: false changelog_fallback_lookback: description: 'The amount of time to look back for merge commits when no previous build commit is found. Default is 24 hours.' type: string @@ -60,71 +56,19 @@ on: jobs: build: - runs-on: ${{ fromJson(format('["self-hosted", "{0}"]', inputs.runner_label)) }} - timeout-minutes: ${{ inputs.timeout_minutes }} - - steps: - - name: Generate changelog if not provided - if: ${{ inputs.changelog == '' }} - id: detect_changes - uses: futuredapp/.github/.github/actions/universal-detect-changes-and-generate-changelog@main - with: - fallback_lookback: ${{ inputs.changelog_fallback_lookback }} - - - name: Checkout - if: ${{ inputs.use_git_lfs == 'true' || inputs.changelog != '' }} - uses: actions/checkout@v4 - with: - lfs: ${{ inputs.use_git_lfs }} - - - name: Set changelog - id: set_changelog - run: | - if [ -n "${{ inputs.changelog }}" ]; then - echo "changelog=${{ inputs.changelog }}" >> $GITHUB_OUTPUT - else - echo "changelog=${{ steps.detect_changes.outputs.changelog }}" >> $GITHUB_OUTPUT - fi - - - name: Export secrets - if: ${{ inputs.xcconfig_path != '' }} - uses: futuredapp/.github/.github/actions/ios-export-secrets@main - with: - XCCONFIG_PATH: ${{ inputs.xcconfig_path }} - SECRET_PROPERTIES: ${{ secrets.SECRET_PROPERTIES }} - REQUIRED_KEYS: ${{ inputs.required_keys }} - - - name: Fastlane Beta - uses: futuredapp/.github/.github/actions/ios-fastlane-beta@main - with: - MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} - testflight_changelog: ${{ steps.set_changelog.outputs.changelog }} - APP_STORE_CONNECT_API_KEY_KEY: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY }} - APP_STORE_CONNECT_API_KEY_KEY_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY_ID }} - APP_STORE_CONNECT_API_KEY_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_ISSUER_ID }} - custom_values: ${{ inputs.custom_values }} - - - name: Upload IPA - uses: actions/upload-artifact@v4 - with: - name: Build.ipa - path: build_output/*.ipa - - - name: Upload dSYM - uses: actions/upload-artifact@v4 - with: - name: Build.app.dSYM.zip - path: build_output/*.app.dSYM.zip - - - name: Save latest build commit SHA to file - if: success() - shell: bash - run: | - echo "${{ github.sha }}" > latest_builded_commit.txt - - - name: Store latest build commit SHA in cache - if: success() - uses: actions/cache/save@v4 - with: - path: latest_builded_commit.txt - key: ${{ steps.detect_changes.outputs.cache_key }} \ No newline at end of file + uses: futuredapp/.github/.github/workflows/ios-selfhosted-nightly-build.yml@main + with: + use_git_lfs: ${{ inputs.use_git_lfs }} + custom_values: ${{ inputs.custom_values }} + runner_label: ${{ inputs.runner_label }} + timeout_minutes: ${{ inputs.timeout_minutes }} + xcconfig_path: ${{ inputs.xcconfig_path }} + secret_properties: ${{ inputs.secret_properties }} + required_keys: ${{ inputs.required_keys }} + changelog_fallback_lookback: ${{ inputs.changelog_fallback_lookback }} + secrets: + MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} + APP_STORE_CONNECT_API_KEY_KEY: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY }} + APP_STORE_CONNECT_API_KEY_KEY_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY_ID }} + APP_STORE_CONNECT_API_KEY_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_ISSUER_ID }} + SECRET_PROPERTIES: ${{ secrets.SECRET_PROPERTIES }} diff --git a/.github/workflows/ios-selfhosted-on-demand-build.yml b/.github/workflows/ios-selfhosted-on-demand-build.yml new file mode 100644 index 0000000..977b67b --- /dev/null +++ b/.github/workflows/ios-selfhosted-on-demand-build.yml @@ -0,0 +1,130 @@ +name: iOS Self-hosted On-Demand Build + +on: + workflow_call: + inputs: + use_git_lfs: + description: 'Whether to download Git-LFS files.' + type: boolean + default: false + custom_values: + description: 'Custom string that can contains values specified in your workflow file. Those values will be placed into environment variable. Example: "CUSTOM-1: 1; CUSTOM-2: 2"' + type: string + required: false + runner_label: + description: 'The custom label for the self-hosted runner to use for the build job.' + type: string + default: 'self-hosted' + timeout_minutes: + description: 'Job timeout in minutes' + type: number + default: 30 + xcconfig_path: + description: 'Path to the .xcconfig file. Selected secret properties will be appended to the end of this file.' + type: string + required: false + secret_properties: + description: 'Secrets in the format KEY = VALUE (one per line).' + type: string + required: false + required_keys: + description: 'Comma-separated list of required keys.' + type: string + required: false + changelog: + description: 'Will be used as TestFlight changelog' + type: string + required: false + changelog_fallback_lookback: + description: 'The amount of time to look back for merge commits when no previous build commit is found. Default is 24 hours.' + type: string + required: false + default: '24 hours' + + secrets: + MATCH_PASSWORD: + required: true + description: 'Password for decrypting of certificates and provisioning profiles.' + APP_STORE_CONNECT_API_KEY_KEY: + required: true + description: 'Private App Store Connect API key for submitting build to App Store.' + APP_STORE_CONNECT_API_KEY_KEY_ID: + required: true + description: 'Private App Store Connect API key for submitting build to App Store.' + APP_STORE_CONNECT_API_KEY_ISSUER_ID: + required: true + description: 'Private App Store Connect API issuer key for submitting build to App Store.' + SECRET_PROPERTIES: + required: false + description: 'Secrets in the format KEY = VALUE (one per line).' + +jobs: + build: + runs-on: ${{ fromJson(format('["self-hosted", "{0}"]', inputs.runner_label)) }} + timeout-minutes: ${{ inputs.timeout_minutes }} + + steps: + - name: Generate changelog if not provided + if: ${{ inputs.changelog == '' }} + id: detect_changes + uses: futuredapp/.github/.github/actions/universal-detect-changes-and-generate-changelog@main + with: + fallback_lookback: ${{ inputs.changelog_fallback_lookback }} + + - name: Checkout + if: ${{ inputs.use_git_lfs == 'true' || inputs.changelog != '' }} + uses: actions/checkout@v4 + with: + lfs: ${{ inputs.use_git_lfs }} + + - name: Set changelog + id: set_changelog + run: | + if [ -n "${{ inputs.changelog }}" ]; then + echo "changelog=${{ inputs.changelog }}" >> $GITHUB_OUTPUT + else + echo "changelog=${{ steps.detect_changes.outputs.changelog }}" >> $GITHUB_OUTPUT + fi + + - name: Export secrets + if: ${{ inputs.xcconfig_path != '' }} + uses: futuredapp/.github/.github/actions/ios-export-secrets@main + with: + XCCONFIG_PATH: ${{ inputs.xcconfig_path }} + SECRET_PROPERTIES: ${{ secrets.SECRET_PROPERTIES }} + REQUIRED_KEYS: ${{ inputs.required_keys }} + + - name: Fastlane Beta + uses: futuredapp/.github/.github/actions/ios-fastlane-beta@main + with: + MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} + testflight_changelog: ${{ steps.set_changelog.outputs.changelog }} + APP_STORE_CONNECT_API_KEY_KEY: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY }} + APP_STORE_CONNECT_API_KEY_KEY_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY_ID }} + APP_STORE_CONNECT_API_KEY_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_ISSUER_ID }} + custom_values: ${{ inputs.custom_values }} + + - name: Upload IPA + uses: actions/upload-artifact@v4 + with: + name: Build.ipa + path: build_output/*.ipa + + - name: Upload dSYM + uses: actions/upload-artifact@v4 + with: + name: Build.app.dSYM.zip + path: build_output/*.app.dSYM.zip + + - name: Save latest build commit SHA to file + if: success() + shell: bash + run: | + echo "${{ github.sha }}" > latest_builded_commit.txt + + - name: Store latest build commit SHA in cache + if: success() + uses: actions/cache/save@v4 + with: + path: latest_builded_commit.txt + key: ${{ steps.detect_changes.outputs.cache_key }} \ No newline at end of file From d289d8a5224ec52b485af6016f19b3dfcd0a00f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=CC=8Cimon=20S=CC=8Cesta=CC=81k?= Date: Fri, 24 Oct 2025 15:40:04 +0200 Subject: [PATCH 15/20] docs: Deprecate `ios-selfhosted-build` and introduce new build workflows Update README to reflect the deprecation of `ios-selfhosted-build` in favor of `ios-selfhosted-nightly-build` and `ios-selfhosted-on-demand-build`. --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0b03544..1ef465c 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,9 @@ All the available reusable workflows are listed in the following table. | Universal | Cloud | Backup | [`universal-cloud-backup`](.github/workflows/universal-cloud-backup.yml) | Backups currently checked out ref to a remote repository. | | Universal | Self-hosted | Backup | [`universal-selfhosted-backup`](.github/workflows/universal-selfhosted-backup.yml) | Backups currently checked out ref to a remote repository. | | iOS | Self-hosted | Test | [`ios-selfhosted-test`](.github/workflows/ios-selfhosted-test.yml) | Lints and tests the PR. | -| iOS | Self-hosted | Build | [`ios-selfhosted-build`](.github/workflows/ios-selfhosted-build.yml) | Creates enterprise release build and submits the build to Futured App Store Connect. | +| iOS | Self-hosted | Build | [`ios-selfhosted-build`](.github/workflows/ios-selfhosted-build.yml) | **Deprecated.** Use `ios-selfhosted-nightly-build` or `ios-selfhosted-on-demand-build`.| +| iOS | Self-hosted | Nightly Build | [`ios-selfhosted-nightly-build`](.github/workflows/ios-selfhosted-nightly-build.yml) | Creates a nightly enterprise build and submits it to App Store Connect. | +| iOS | Self-hosted | On-Demand Build | [`ios-selfhosted-on-demand-build`](.github/workflows/ios-selfhosted-on-demand-build.yml) | Creates an on-demand enterprise build and submits it to App Store Connect. | | iOS | Self-hosted | Release | [`ios-selfhosted-release`](.github/workflows/ios-selfhosted-release.yml) | Creates release build and submits it to App Store Connect. | | iOS (KMP) | Self-hosted | Test | [`ios-kmp-selfhosted-test`](.github/workflows/ios-kmp-selfhosted-test.yml) | Lints and tests the PR. | | iOS (KMP) | Self-hosted | Build | [`ios-kmp-selfhosted-build`](.github/workflows/ios-kmp-selfhosted-build.yml) | Creates enterprise release build and submits the build to Futured App Store Connect. | From 148713cdee6920b0251bae715578908a6c73fd1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=CC=8Cimon=20S=CC=8Cesta=CC=81k?= Date: Fri, 24 Oct 2025 16:34:14 +0200 Subject: [PATCH 16/20] chore: Quote $GITHUB_OUTPUT in iOS workflow files Ensures robustness of shell commands by properly quoting the output file path. --- .github/workflows/ios-selfhosted-nightly-build.yml | 2 +- .github/workflows/ios-selfhosted-on-demand-build.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ios-selfhosted-nightly-build.yml b/.github/workflows/ios-selfhosted-nightly-build.yml index 30af163..a66c32c 100644 --- a/.github/workflows/ios-selfhosted-nightly-build.yml +++ b/.github/workflows/ios-selfhosted-nightly-build.yml @@ -76,7 +76,7 @@ jobs: if: ${{ steps.detect_changes.outputs.skip_build == 'false' }} id: set_changelog run: | - echo "changelog=${{ steps.detect_changes.outputs.changelog }}" >> $GITHUB_OUTPUT + echo "changelog=${{ steps.detect_changes.outputs.changelog }}" >> "$GITHUB_OUTPUT" - name: Export secrets if: ${{ steps.detect_changes.outputs.skip_build == 'false' && inputs.xcconfig_path != '' }} diff --git a/.github/workflows/ios-selfhosted-on-demand-build.yml b/.github/workflows/ios-selfhosted-on-demand-build.yml index 977b67b..8d16855 100644 --- a/.github/workflows/ios-selfhosted-on-demand-build.yml +++ b/.github/workflows/ios-selfhosted-on-demand-build.yml @@ -81,9 +81,9 @@ jobs: id: set_changelog run: | if [ -n "${{ inputs.changelog }}" ]; then - echo "changelog=${{ inputs.changelog }}" >> $GITHUB_OUTPUT + echo "changelog=${{ inputs.changelog }}" >> "$GITHUB_OUTPUT" else - echo "changelog=${{ steps.detect_changes.outputs.changelog }}" >> $GITHUB_OUTPUT + echo "changelog=${{ steps.detect_changes.outputs.changelog }}" >> "$GITHUB_OUTPUT" fi - name: Export secrets From b9626697a4d4b2aa29a336602d67cbba532982a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=CC=8Cimon=20S=CC=8Cesta=CC=81k?= Date: Fri, 24 Oct 2025 16:57:05 +0200 Subject: [PATCH 17/20] feat: Add deprecation warning to ios-selfhosted-build.yml This workflow is deprecated and users should migrate to ios-selfhosted-nightly-build.yml. --- .github/workflows/ios-selfhosted-build.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/ios-selfhosted-build.yml b/.github/workflows/ios-selfhosted-build.yml index 578285b..ca36f2a 100644 --- a/.github/workflows/ios-selfhosted-build.yml +++ b/.github/workflows/ios-selfhosted-build.yml @@ -55,6 +55,13 @@ on: description: 'Secrets in the format KEY = VALUE (one per line).' jobs: + deprecation-warning: + runs-on: ubuntu-latest + steps: + - name: Show deprecation warning + run: | + echo "::warning::This workflow ('ios-selfhosted-build.yml') is deprecated and will be removed in the future." + echo "::warning::Please use 'ios-selfhosted-nightly-build.yml' instead." build: uses: futuredapp/.github/.github/workflows/ios-selfhosted-nightly-build.yml@main with: From c364d8684c37e230afa8f26451afb79fc57a3698 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=CC=8Cimon=20S=CC=8Cesta=CC=81k?= Date: Wed, 29 Oct 2025 08:35:23 +0100 Subject: [PATCH 18/20] refactor(ios-fastlane-actions): Simplify environment variable handling Environment variables are now directly set in `action.yml`, eliminating the need for explicit re-exporting in the associated shell scripts. --- .github/actions/ios-fastlane-beta/action.yml | 12 ++++++------ .github/actions/ios-fastlane-beta/beta.sh | 8 ++------ .github/actions/ios-fastlane-release/action.yml | 12 ++++++------ .github/actions/ios-fastlane-release/release.sh | 8 ++------ .github/actions/ios-fastlane-test/action.yml | 4 ++-- .github/actions/ios-fastlane-test/test.sh | 4 ++-- 6 files changed, 20 insertions(+), 28 deletions(-) diff --git a/.github/actions/ios-fastlane-beta/action.yml b/.github/actions/ios-fastlane-beta/action.yml index 742ab18..2c2d289 100644 --- a/.github/actions/ios-fastlane-beta/action.yml +++ b/.github/actions/ios-fastlane-beta/action.yml @@ -26,9 +26,9 @@ runs: shell: bash run: ${{ github.action_path }}/beta.sh env: - INPUT_MATCH_PASSWORD: ${{ inputs.match_password }} - INPUT_TESTFLIGHT_CHANGELOG: ${{ inputs.testflight_changelog }} - INPUT_APP_STORE_CONNECT_API_KEY_KEY: ${{ inputs.app_store_connect_api_key_key }} - INPUT_APP_STORE_CONNECT_API_KEY_KEY_ID: ${{ inputs.app_store_connect_api_key_key_id }} - INPUT_APP_STORE_CONNECT_API_KEY_ISSUER_ID: ${{ inputs.app_store_connect_api_key_issuer_id }} - INPUT_CUSTOM_VALUES: ${{ inputs.custom_values }} + MATCH_PASSWORD: ${{ inputs.match_password }} + TESTFLIGHT_CHANGELOG: ${{ inputs.testflight_changelog }} + APP_STORE_CONNECT_API_KEY_KEY: ${{ inputs.app_store_connect_api_key_key }} + APP_STORE_CONNECT_API_KEY_KEY_ID: ${{ inputs.app_store_connect_api_key_key_id }} + APP_STORE_CONNECT_API_KEY_ISSUER_ID: ${{ inputs.app_store_connect_api_key_issuer_id }} + CUSTOM_VALUES: ${{ inputs.custom_values }} diff --git a/.github/actions/ios-fastlane-beta/beta.sh b/.github/actions/ios-fastlane-beta/beta.sh index 316f9b7..ce87acd 100755 --- a/.github/actions/ios-fastlane-beta/beta.sh +++ b/.github/actions/ios-fastlane-beta/beta.sh @@ -4,11 +4,7 @@ set -e gem install bundler bundle install --jobs 4 --retry 3 -export MATCH_PASSWORD="$INPUT_MATCH_PASSWORD" -export PR_TITLE="$INPUT_TESTFLIGHT_CHANGELOG" -export APP_STORE_CONNECT_API_KEY_KEY="$INPUT_APP_STORE_CONNECT_API_KEY_KEY" -export APP_STORE_CONNECT_API_KEY_KEY_ID="$INPUT_APP_STORE_CONNECT_API_KEY_KEY_ID" -export APP_STORE_CONNECT_API_KEY_ISSUER_ID="$INPUT_APP_STORE_CONNECT_API_KEY_ISSUER_ID" -export CUSTOM_VALUES="$INPUT_CUSTOM_VALUES" +# Environment variables are already set by action.yml +# No need to re-export them bundle exec fastlane beta diff --git a/.github/actions/ios-fastlane-release/action.yml b/.github/actions/ios-fastlane-release/action.yml index dbe9d20..52b0d37 100644 --- a/.github/actions/ios-fastlane-release/action.yml +++ b/.github/actions/ios-fastlane-release/action.yml @@ -26,9 +26,9 @@ runs: shell: bash run: ${{ github.action_path }}/release.sh env: - INPUT_MATCH_PASSWORD: ${{ inputs.match_password }} - INPUT_VERSION_NUMBER: ${{ inputs.version_number }} - INPUT_APP_STORE_CONNECT_API_KEY_KEY: ${{ inputs.app_store_connect_api_key_key }} - INPUT_APP_STORE_CONNECT_API_KEY_KEY_ID: ${{ inputs.app_store_connect_api_key_key_id }} - INPUT_APP_STORE_CONNECT_API_KEY_ISSUER_ID: ${{ inputs.app_store_connect_api_key_issuer_id }} - INPUT_CUSTOM_VALUES: ${{ inputs.custom_values }} + MATCH_PASSWORD: ${{ inputs.match_password }} + VERSION_NUMBER: ${{ inputs.version_number }} + APP_STORE_CONNECT_API_KEY_KEY: ${{ inputs.app_store_connect_api_key_key }} + APP_STORE_CONNECT_API_KEY_KEY_ID: ${{ inputs.app_store_connect_api_key_key_id }} + APP_STORE_CONNECT_API_KEY_ISSUER_ID: ${{ inputs.app_store_connect_api_key_issuer_id }} + CUSTOM_VALUES: ${{ inputs.custom_values }} diff --git a/.github/actions/ios-fastlane-release/release.sh b/.github/actions/ios-fastlane-release/release.sh index f04ba8d..b497378 100755 --- a/.github/actions/ios-fastlane-release/release.sh +++ b/.github/actions/ios-fastlane-release/release.sh @@ -4,11 +4,7 @@ set -e gem install bundler bundle install --jobs 4 --retry 3 -export MATCH_PASSWORD="$INPUT_MATCH_PASSWORD" -export VERSION_NUMBER="$INPUT_VERSION_NUMBER" -export APP_STORE_CONNECT_API_KEY_KEY="$INPUT_APP_STORE_CONNECT_API_KEY_KEY" -export APP_STORE_CONNECT_API_KEY_KEY_ID="$INPUT_APP_STORE_CONNECT_API_KEY_KEY_ID" -export APP_STORE_CONNECT_API_KEY_ISSUER_ID="$INPUT_APP_STORE_CONNECT_API_KEY_ISSUER_ID" -export CUSTOM_VALUES="$INPUT_CUSTOM_VALUES" +# Environment variables are already set by action.yml +# No need to re-export them bundle exec fastlane release diff --git a/.github/actions/ios-fastlane-test/action.yml b/.github/actions/ios-fastlane-test/action.yml index 99562e0..7f86a5c 100644 --- a/.github/actions/ios-fastlane-test/action.yml +++ b/.github/actions/ios-fastlane-test/action.yml @@ -14,5 +14,5 @@ runs: shell: bash run: ${{ github.action_path }}/test.sh env: - INPUT_GITHUB_TOKEN: ${{ inputs.github_token }} - INPUT_CUSTOM_VALUES: ${{ inputs.custom_values }} + GITHUB_TOKEN: ${{ inputs.github_token }} + CUSTOM_VALUES: ${{ inputs.custom_values }} diff --git a/.github/actions/ios-fastlane-test/test.sh b/.github/actions/ios-fastlane-test/test.sh index 0a30e29..b64ed00 100755 --- a/.github/actions/ios-fastlane-test/test.sh +++ b/.github/actions/ios-fastlane-test/test.sh @@ -4,7 +4,7 @@ set -e gem install bundler bundle install --jobs 4 --retry 3 -export DANGER_GITHUB_API_TOKEN="$INPUT_GITHUB_TOKEN" -export CUSTOM_VALUES="$INPUT_CUSTOM_VALUES" +# Environment variables are already set by action.yml +# No need to re-export them bundle exec fastlane test From b70a44efd82668be136143f6b0e7dfb30025874f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=CC=8Cimon=20S=CC=8Cesta=CC=81k?= Date: Wed, 29 Oct 2025 08:43:53 +0100 Subject: [PATCH 19/20] chore(ci): Make GitHub tokens optional in iOS test workflows The github_token and GITHUB_TOKEN_DANGER inputs are no longer strictly required for iOS Fastlane test actions and self-hosted test workflows, allowing for more flexible execution. --- .github/actions/ios-fastlane-test/action.yml | 2 +- .github/workflows/ios-selfhosted-test.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/ios-fastlane-test/action.yml b/.github/actions/ios-fastlane-test/action.yml index 7f86a5c..02b6cc1 100644 --- a/.github/actions/ios-fastlane-test/action.yml +++ b/.github/actions/ios-fastlane-test/action.yml @@ -3,7 +3,7 @@ description: 'Runs Fastlane test' inputs: github_token: description: 'GitHub token' - required: true + required: false custom_values: description: 'Custom values' required: false diff --git a/.github/workflows/ios-selfhosted-test.yml b/.github/workflows/ios-selfhosted-test.yml index a54bcba..b617f6c 100644 --- a/.github/workflows/ios-selfhosted-test.yml +++ b/.github/workflows/ios-selfhosted-test.yml @@ -22,7 +22,7 @@ on: secrets: GITHUB_TOKEN_DANGER: - required: true + required: false description: 'GitHub token for Danger. Must have permissions to read and write issues and pull requests.' concurrency: From 93254ccef6e9a027de9cad672755a0d91cc3f88b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=CC=8Cimon=20S=CC=8Cesta=CC=81k?= Date: Wed, 29 Oct 2025 10:47:43 +0100 Subject: [PATCH 20/20] fix(ci): Use PR_TITLE for TestFlight changelog Fastlane expects `PR_TITLE` environment variable for the changelog when building beta versions. --- .github/actions/ios-fastlane-beta/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/ios-fastlane-beta/action.yml b/.github/actions/ios-fastlane-beta/action.yml index 2c2d289..0bc5cde 100644 --- a/.github/actions/ios-fastlane-beta/action.yml +++ b/.github/actions/ios-fastlane-beta/action.yml @@ -27,7 +27,7 @@ runs: run: ${{ github.action_path }}/beta.sh env: MATCH_PASSWORD: ${{ inputs.match_password }} - TESTFLIGHT_CHANGELOG: ${{ inputs.testflight_changelog }} + PR_TITLE: ${{ inputs.testflight_changelog }} APP_STORE_CONNECT_API_KEY_KEY: ${{ inputs.app_store_connect_api_key_key }} APP_STORE_CONNECT_API_KEY_KEY_ID: ${{ inputs.app_store_connect_api_key_key_id }} APP_STORE_CONNECT_API_KEY_ISSUER_ID: ${{ inputs.app_store_connect_api_key_issuer_id }}