build-new-version #13
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 production ios app locally | |
# Controls when the action will run | |
on: | |
# Triggers the workflow on repository_dispatch events but only for the build-new-version event | |
repository_dispatch: | |
types: [build-new-version] | |
# Allows to run the workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: macos-14 | |
environment: production | |
steps: | |
- name: π Setup repo | |
uses: actions/checkout@v4 | |
- name: π Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
cache: yarn | |
- uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: '15.3' | |
- name: create Google Services File | |
env: | |
DATA: ${{ secrets.GOOGLE_SERVICE_INFO_PLIST }} | |
run: | | |
echo $DATA | base64 --decode > ${{ github.workspace }}/GoogleService-Info.plist | |
- name: π Setup EAS | |
uses: expo/expo-github-action@v8 | |
with: | |
eas-version: latest | |
token: ${{ secrets.EXPO_TOKEN }} | |
- name: π¦ Install dependencies | |
run: yarn | |
- name: π Build app | |
env: | |
EXPO_PUBLIC_API_HOST: ${{ vars.API_HOST }} | |
EXPO_PUBLIC_AUTH_HOST: ${{ vars.AUTH_HOST }} | |
EXPO_PUBLIC_BUILDER_HOST: ${{ vars.BUILDER_HOST }} | |
EXPO_PUBLIC_DEFAULT_LIBRARY_SEARCH_KEYWORDS: ${{ vars.DEFAULT_LIBRARY_SEARCH_KEYWORDS }} | |
EXPO_PUBLIC_LIBRARY_HOST: ${{ vars.LIBRARY_HOST }} | |
EXPO_PUBLIC_PLAYER_HOST: ${{ vars.PLAYER_HOST }} | |
EXPO_PUBLIC_SENTRY_DSN: ${{ secrets.SENTRY_DSN }} | |
EXPO_PUBLIC_SENTRY_ORG: ${{ vars.SENTRY_ORG }} | |
EXPO_PUBLIC_SENTRY_PROJECT: ${{ vars.SENTRY_PROJECT }} | |
EXPO_PUBLIC_SHORT_HOST: ${{ vars.SHORT_HOST }} | |
GOOGLE_SERVICES_INFO_PLIST: ${{ github.workspace }}/GoogleService-Info.plist | |
run: eas build --non-interactive --platform ios --local -e production --output ${{ github.workspace }}/ios-release.ipa | |
- name: Upload IPA artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ios-release | |
path: ${{ github.workspace }}/ios-release.ipa | |
- name: Upload artifact to Release | |
if: ${{ github.event.client_payload.release_created == 'true' }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }} | |
run: gh release upload ${{ github.event.client_payload.tag }} ${{ github.workspace }}/ios-release.ipa |