release/LekaApp/1.0.0 #218
Workflow file for this run
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: System - Upgrade tools & clean | |
on: | |
pull_request: | |
types: [labeled] | |
schedule: | |
# Runs at 3:00 UTC every day | |
- cron: "0 3 * * *" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
upgrade_tools: | |
if: | | |
(github.event_name == 'pull_request' && github.event.label.name == 'ci:upgrade_tools') || | |
contains(github.event_name, 'schedule') | |
name: Upgrade tools | |
runs-on: [self-hosted, iOS] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 # shallow clone | |
- name: Setup mise | |
run: | | |
echo "$HOME/.local/share/mise/shims" >> $GITHUB_PATH | |
- name: Tools' versions before | |
run: | | |
which mise | |
mise --version | |
which xcodebuild | |
xcodebuild -version | |
which tuist | |
tuist version | |
which fastlane | |
fastlane --version | |
which swiftlint | |
swiftlint --version | |
which swiftformat | |
swiftformat --version | |
which bundle | |
bundle --version | |
- name: Upgrade brew | |
run: | | |
brew update | |
brew upgrade | |
brew cleanup -s --prune=all | |
- name: Install mise tools | |
run: | | |
mise uninstall --all | |
mise install | |
- name: Upgrade bundle | |
run: | | |
bundle update --bundler | |
- name: tuist clean | |
run: | | |
tuist clean | |
- name: Delete Xcode derived data | |
run: | | |
rm -rf ~/Library/Developer/Xcode/DerivedData | |
- name: Tools' versions after | |
run: | | |
which mise | |
mise --version | |
which xcodebuild | |
xcodebuild -version | |
which tuist | |
tuist version | |
which fastlane | |
fastlane --version | |
which swiftlint | |
swiftlint --version | |
which swiftformat | |
swiftformat --version | |
which bundle | |
bundle --version | |
- name: Remove label | |
if: github.event_name == 'pull_request' && github.event.label.name == 'ci:upgrade_tools' | |
uses: actions/github-script@v6 | |
with: | |
github-token: ${{secrets.GITHUB_TOKEN}} | |
script: | | |
const { LABEL_NAME } = process.env | |
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 }} |