Update uploadTestflight.yml #39
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
name: uploadTestFlight | |
on: | |
push: | |
branches: [ "develop" ] | |
jobs: | |
build: | |
runs-on: macos-latest | |
steps: | |
# Checkout the code from the repository | |
- uses: actions/checkout@v2 | |
# Setup the specific Xcode version required | |
- name: Setup Xcode version | |
uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: 16.0-beta | |
# Uninstall the deprecated Tuist version | |
- name: Uninstall Deprecated Tuist | |
run: curl -Ls https://uninstall.tuist.io | bash | |
# Install and activate Mise | |
- name: Install and Activate Mise | |
run: | | |
curl https://mise.run | sh | |
# Add Mise shims directory to PATH | |
echo 'export PATH="$HOME/.local/share/mise/shims:$PATH"' >> $GITHUB_ENV | |
export PATH="$HOME/.local/share/mise/shims:$PATH" # Immediately update the PATH | |
# Activate Mise in the current session | |
eval "$(/Users/runner/.local/bin/mise activate bash)" | |
# Check Mise installation status | |
mise doctor | |
# Install a specific version of Tuist using Mise | |
- name: Install Specific Tuist Version | |
run: mise install [email protected] | |
# Use the installed Tuist version globally | |
- name: Use Specific Tuist Version Globally | |
run: mise use -g [email protected] | |
# Verify Tuist installation and add Tuist to PATH | |
- name: Verify Tuist Installation | |
run: | | |
# Debugging: Check common installation paths for Tuist | |
echo "Checking common Tuist installation directories..." | |
ls -al $HOME/.local/share/mise/shims | |
ls -al /usr/local/bin | |
ls -al $HOME/.local/bin | |
# Attempt to find the Tuist executable | |
echo "Searching for Tuist..." | |
find $HOME -name tuist 2>/dev/null | |
find /usr/local -name tuist 2>/dev/null | |
# Update the PATH for this session and add it to the environment for future steps | |
export PATH="$HOME/.local/share/mise/shims:$PATH" | |
echo 'export PATH="$HOME/.local/share/mise/shims:$PATH"' >> $GITHUB_ENV | |
# Check if Tuist is available and verify the version | |
which tuist | |
tuist --version | |
# Install Fastlane using Homebrew | |
- name: Install Fastlane | |
run: brew install fastlane | |
# Setup Ruby environment with the specified version | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '3.3' | |
bundler-cache: true | |
# Execute Tuist commands: clean, install dependencies, and generate the project | |
- name: Execute Tuist tasks | |
run: | | |
export PATH="$HOME/.tuist/bin:$PATH" # Ensure PATH is updated in each step | |
tuist clean | |
tuist install | |
tuist generate | |
working-directory: ./OPeace | |
# Run Fastlane with the specified environment variables for deployment | |
- name: Run Fastlane QA | |
run: | | |
export PATH="$HOME/.tuist/bin:$PATH" # Ensure PATH is updated in each step | |
bundle exec fastlane QA | |
working-directory: ./OPeace | |
env: | |
APP_NAME: "OPeace" | |
SCHEME: "OPeace-QA" | |
TEAM_ID: ${{ secrets.TEAM_ID }} | |
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 }} | |
APP_STORE_CONNECT_API_KEY_KEY: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY }} | |
SLACK_URL_UPLOAD: ${{ secrets.SLACK_URL_UPLOAD }} |