Deploy to Apple App Store Production, Manual #25
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: Deploy to Apple App Store Production, Manual | |
on: | |
workflow_dispatch: | |
jobs: | |
check_date: | |
runs-on: ubuntu-latest | |
name: Check latest commit | |
outputs: | |
should_run: ${{ steps.should_run.outputs.should_run }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: print latest_commit | |
run: echo ${{ github.sha }} | |
- id: should_run | |
continue-on-error: true | |
name: check latest commit is less than a day | |
if: ${{ github.event_name == 'schedule' }} | |
run: test -z $(git rev-list --after="24 hours" ${{ github.sha }}) && echo "::set-output name=should_run::false" | |
ios-deploy: | |
name: Deploying to Production | |
runs-on: macOS-latest | |
needs: check_date | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up ruby env | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 3.3.1 | |
bundler-cache: false | |
working-directory: ios/App | |
- run: | | |
cd ios/App; bundle install; bundle exec fastlane install_plugins | |
- name: Use Node.js 20 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
cache: 'npm' | |
- name: Use Python 3.10 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Building webapp | |
run: | | |
export platform="github-actions-ios" | |
export serverprefix="fieldmark" | |
export PYTHON=python3.10 | |
export VITE_CLUSTER_ADMIN_GROUP_NAME=cluster-admin | |
export VITE_COMMIT_VERSION=$(bin/getDescribeString.sh ios) | |
export VITE_SHOW_WIPE=true | |
export VITE_SHOW_MINIFAUXTON=false | |
export VITE_DIRECTORY_HOST=db.fieldmark.app | |
export VITE_DIRECTORY_PORT=443 | |
export VITE_PRODUCTION_BUILD=true | |
export VITE_SERVICES=FAIMSTEXT | |
export VITE_PROD_BUILD=true | |
export VITE_TAG=prodIOS | |
export VITE_BUGSNAG_KEY=${{secrets.BUGSNAG_KEY}} | |
git clean -xfd | |
npm ci --python=python3.10 | |
npm run build | |
- run: npx cap update ios | |
- run: npx cap sync --deployment ios | |
- run: cd ios/App; pod install | |
- name: Deploy iOS app to production with Fastlane | |
uses: maierj/[email protected] | |
with: | |
lane: production | |
subdirectory: 'ios/App' | |
bundle-install-path: '$HOME/vendor/bundle' | |
verbose: false | |
env: | |
VITE_LOGIN_TOKEN: "${{ secrets.JWT_TEST_TOKEN }}" | |
APP_STORE_CONNECT_TEAM_ID: '${{ secrets.APP_STORE_CONNECT_TEAM_ID }}' | |
DEVELOPER_APP_ID: '${{ secrets.DEVELOPER_APP_ID }}' | |
DEVELOPER_APP_IDENTIFIER: '${{ secrets.DEVELOPER_APP_IDENTIFIER }}' | |
DEVELOPER_PORTAL_TEAM_ID: '${{ secrets.DEVELOPER_PORTAL_TEAM_ID }}' | |
FASTLANE_APPLE_ID: '${{ secrets.FASTLANE_APPLE_ID }}' | |
FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD: '${{ secrets.FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD }}' | |
MATCH_PASSWORD: '${{ secrets.MATCH_PASSWORD }}' | |
GIT_AUTHORIZATION: '${{ secrets.GIT_AUTHORIZATION }}' | |
PROVISIONING_PROFILE_SPECIFIER: '${{ secrets.PROVISIONING_PROFILE_SPECIFIER }}' | |
TEMP_KEYCHAIN_PASSWORD: '${{ secrets.TEMP_KEYCHAIN_PASSWORD }}' | |
TEMP_KEYCHAIN_USER: '${{ secrets.TEMP_KEYCHAIN_USER }}' | |
APPLE_KEY_ID: '${{ secrets.APPLE_KEY_ID }}' | |
APPLE_ISSUER_ID: '${{ secrets.APPLE_ISSUER_ID }}' | |
APPLE_KEY_CONTENT: '${{ secrets.APPLE_KEY_CONTENT }}' | |
BROWSERSTACK_USERNAME: '${{secrets.BROWSERSTACK_USERNAME}}' | |
BROWSERSTACK_ACCESS_KEY: '${{secrets.BROWSERSTACK_ACCESS_KEY}}' | |
- name: Archive ipas | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ipa | |
path: | | |
/Users/runner/work/FAIMS3/FAIMS3/ios/App/App.ipa |