🔀️ Merge branch 'hugo/feature/Migrate-folders-and-files-from-Old-to-N… #729
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Leka - iOS Monorepo | |
# Copyright APF France handicap | |
# SPDX-License-Identifier: Apache-2.0 | |
name: Fastlane - Internal Beta Release | |
on: | |
pull_request: | |
types: [labeled] | |
push: | |
branches: | |
- develop | |
paths: | |
- "Apps/LekaApp/**/*.swift" | |
- "Apps/LekaApp/**/*.yml" | |
- "Modules/**/*.swift" | |
- "Modules/**/*.yml" | |
- "Modules/ContentKit/**" | |
- "Tuist/Package.swift" | |
- "Tuist/Package.resolved" | |
- "!**/Examples/**/*.swift" | |
workflow_dispatch: # nothing to setup here, just to trigger the workflow manually | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
APP_STORE_CONNECT_API_KEY_CONTENT: ${{ secrets. APP_STORE_CONNECT_API_KEY_CONTENT }} | |
APP_STORE_CONNECT_ISSUER_ID: ${{ secrets. APP_STORE_CONNECT_ISSUER_ID }} | |
APP_STORE_CONNECT_API_KEY_ID: ${{ secrets. APP_STORE_CONNECT_API_KEY_ID }} | |
FASTLANE_KEYCHAIN_PASSWORD: ${{ secrets.FASTLANE_KEYCHAIN_PASSWORD }} | |
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} | |
MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }} | |
jobs: | |
internal_beta_release: | |
name: fastlane release beta_internal | |
runs-on: [self-hosted, iOS, release] | |
if: (github.event_name == 'pull_request' && contains(github.event.label.name, 'fastlane:beta')) || (github.event_name == 'push') || (github.event_name == 'workflow_dispatch') | |
env: | |
PR_NUMBER: ${{ github.event.pull_request.number }} | |
FASTLANE_SKIP_UPDATE_CHECK: 1 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
lfs: true | |
- name: Setup for Pull Request | |
if: github.event_name == 'pull_request' && contains(github.event.label.name, 'fastlane:beta') | |
run: | | |
git checkout ${{ env.BASE_REF }} | |
git checkout ${{ env.HEAD_REF }} | |
env: | |
BASE_REF: ${{ github.event.pull_request.base.ref }} | |
HEAD_REF: ${{ github.head_ref }} | |
- name: Set up mise | |
uses: jdx/mise-action@v2 | |
with: | |
version: 2025.1.7 | |
install: true | |
cache: true | |
- uses: actions/cache@v4 | |
with: | |
path: vendor/bundle | |
key: ${{ runner.os }}-gems-${{ runner.name }}-${{ hashFiles('**/Gemfile.lock') }} | |
restore-keys: | | |
${{ runner.os }}-gems-${{ runner.name }}- | |
${{ runner.os }}-gems- | |
- name: bundle install | |
run: | | |
bundle config path vendor/bundle | |
bundle install | |
- name: tuist install | |
run: | | |
tuist install | |
- name: fastlane helloworld | |
run: | | |
bundle exec fastlane helloworld | |
- name: fastlane sync_certificates | |
run: | | |
bundle exec fastlane sync_certificates release:true --verbose | |
- name: fastlane beta_internal LekaApp | |
if: (github.event_name == 'pull_request' && contains(github.event.label.name, 'LekaApp')) || (github.event_name == 'push') || (github.event_name == 'workflow_dispatch') | |
run: | | |
bundle exec fastlane beta_internal targets:LekaApp --verbose | |
- name: fastlane beta_internal LekaUpdater | |
if: github.event_name == 'pull_request' && contains(github.event.label.name, 'LekaUpdater') | |
run: | | |
bundle exec fastlane beta_internal targets:LekaUpdater --verbose | |
- name: Post Github comment | |
if: success() && github.event_name == 'pull_request' && contains(github.event.label.name, 'fastlane:beta') | |
uses: marocchino/sticky-pull-request-comment@v2 | |
with: | |
hide_and_recreate: true | |
hide_classify: "OUTDATED" | |
header: testflight | |
message: | | |
${{ env.CHANGELOG_FOR_GITHUB }} | |
- name: Post to a Slack channel | |
id: slack | |
if: ${{ env.CHANGELOG_FOR_SLACK != '' }} | |
uses: slackapi/[email protected] | |
with: | |
channel-id: "C3SHVTYNP,C041YEWNVJS" | |
slack-message: ${{ env.CHANGELOG_FOR_SLACK }} | |
env: | |
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} | |
- name: remove label | |
if: always() && github.event_name == 'pull_request' && contains(github.event.label.name, 'fastlane:beta') | |
uses: actions/github-script@v7 | |
with: | |
github-token: ${{secrets.GITHUB_TOKEN}} | |
script: | | |
const { LABEL_NAME } = process.env; | |
const labels = await github.rest.issues.listLabelsOnIssue({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo | |
}); | |
if (labels.data.some(label => label.name === LABEL_NAME)) { | |
await github.rest.issues.removeLabel({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
name: LABEL_NAME | |
}); | |
} | |
env: | |
LABEL_NAME: ${{ github.event.label.name }} |