Feature/sergey yukhanov/add ability to change cubes style #181
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
name: Build Random Pro | |
on: | |
pull_request: | |
types: [opened, synchronize] | |
jobs: | |
build: | |
runs-on: macos-latest | |
environment: | |
name: build_Random_Pro | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up API keys | |
run: | | |
echo "API_KEY_YANDEX_METRICA=${{ secrets.API_KEY_YANDEX_METRICA }}" >> $GITHUB_ENV | |
echo "API_KEY_APPHUD=${{ secrets.API_KEY_APPHUD }}" >> $GITHUB_ENV | |
echo "API_KEY_KINOPOISK=${{ secrets.API_KEY_KINOPOISK }}" >> $GITHUB_ENV | |
echo "API_KEY_MOST_POPULAR_MOVIES=${{ secrets.API_KEY_MOST_POPULAR_MOVIES }}" >> $GITHUB_ENV | |
echo "FANCY_BACKEND=${{ secrets.FANCY_BACKEND }}" >> $GITHUB_ENV | |
- name: Import certificate and provisioning profiles | |
env: | |
IOS_CERTIFICATE: ${{ secrets.IOS_CERTIFICATE }} | |
IOS_PROVISIONING_PROFILE: ${{ secrets.IOS_PROVISIONING_PROFILE }} | |
RANDOM_YES_NO_WIDGET_PROFILE: ${{ secrets.RANDOM_YES_NO_WIDGET_PROFILE }} | |
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }} | |
run: | | |
echo "$IOS_CERTIFICATE" | base64 --decode > /tmp/Certificate.p12 | |
echo "$IOS_PROVISIONING_PROFILE" | base64 --decode > /tmp/Profile.mobileprovision | |
echo "$RANDOM_YES_NO_WIDGET_PROFILE" | base64 --decode > /tmp/RandomYesNoWidgetProfile.mobileprovision | |
security create-keychain -p "$KEYCHAIN_PASSWORD" ~/Library/Keychains/build.keychain | |
security default-keychain -s ~/Library/Keychains/build.keychain | |
security unlock-keychain -p "$KEYCHAIN_PASSWORD" ~/Library/Keychains/build.keychain | |
security set-keychain-settings -lut 3600 ~/Library/Keychains/build.keychain | |
security import /tmp/Certificate.p12 -k ~/Library/Keychains/build.keychain -P "" -T /usr/bin/codesign -A | |
security set-key-partition-list -S apple-tool:,apple: -s -k "$KEYCHAIN_PASSWORD" ~/Library/Keychains/build.keychain | |
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles | |
cp /tmp/Profile.mobileprovision ~/Library/MobileDevice/Provisioning\ Profiles/ | |
cp /tmp/RandomYesNoWidgetProfile.mobileprovision ~/Library/MobileDevice/Provisioning\ Profiles/ | |
PROVISIONING_PROFILE_UUID=$(grep -a -A 1 "UUID" /tmp/Profile.mobileprovision | tail -1 | awk -F '<string>' '{print $2}' | awk -F '</string>' '{print $1}') | |
RANDOM_YES_NO_WIDGET_PROFILE_UUID=$(grep -a -A 1 "UUID" /tmp/RandomYesNoWidgetProfile.mobileprovision | tail -1 | awk -F '<string>' '{print $2}' | awk -F '</string>' '{print $1}') | |
echo "PROVISIONING_PROFILE_UUID=$PROVISIONING_PROFILE_UUID" >> $GITHUB_ENV | |
echo "RANDOM_YES_NO_WIDGET_PROFILE_UUID=$RANDOM_YES_NO_WIDGET_PROFILE_UUID" >> $GITHUB_ENV | |
- name: Set up Tuist | |
run: | | |
curl -Ls https://install.tuist.io | bash | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 2.7 | |
- name: Set up fastlane | |
run: | | |
gem install bundler | |
bundle install --jobs 4 --retry 3 | |
- name: Run Danger | |
env: | |
GITHUB_TOKEN: ${{ secrets.TOKEN_GITHUB }} | |
run: bundle exec danger | |
- name: Tuist fetch | |
run: | | |
tuist fetch | |
- name: Tuist generate | |
run: | | |
tuist generate | |
- name: Run tests | |
run: | | |
bundle exec fastlane test | |
- name: Build and archive the app | |
run: | | |
bundle exec fastlane build | |
env: | |
APP_IDENTIFIER: ${{ secrets.APP_IDENTIFIER }} | |
PROVISIONING_PROFILE_UUID: ${{ env.PROVISIONING_PROFILE_UUID }} | |
SIGNING_CERTIFICATE: ${{ secrets.SIGNING_CERTIFICATE }} | |
- name: Upload App build artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Random | |
path: "Random.ipa" | |
- name: Upload dSYM build artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Random.app.dSYM | |
path: "Random.app.dSYM.zip" |