Skip to content

Update pubspec.yaml

Update pubspec.yaml #1

Workflow file for this run

name: Deploy to App Store
on:
workflow_dispatch:
inputs:
lane:
description: 'Choose which lane to run'
required: true
default: 'beta'
push:
tags:
- 'v*'
jobs:
deploy_ios:
name: Deploy to App Store using ${{ github.event.inputs.lane }} lane
runs-on: macos-latest
environment: prod
steps:
- name: Clone Flutter repository with stable channel
uses: subosito/[email protected]
with:
channel: stable
- name: Checkout code
uses: actions/checkout@v2
- name: Setup OnePub
env:
ONEPUB_TOKEN: ${{ secrets.ONEPUB_TOKEN }}
run: |
echo "Setting up OnePub..."
mkdir -p $PUB_CACHE/credentials
dart pub global activate onepub
dart pub global run onepub import
echo '{
"https://onepub.dev/api/kdpxxpsdav/": {
"token": "${{ secrets.ONEPUB_TOKEN }}"
}
}' > $PUB_CACHE/credentials/credentials.json
- name: Set environment variables from GitHub Secrets
run: |
echo "URL=${{ secrets.PROD_URL }}" >> $GITHUB_ENV
echo "INIT_TOKEN=${{ secrets.PROD_INIT_TOKEN }}" >> $GITHUB_ENV
echo "SENTRY_DSN=${{ secrets.SENTRY_DSN }}" >> $GITHUB_ENV
- name: Create .env file
run: |
echo "URL=${{ secrets.PROD_URL }}" > ios/.env
echo "INIT_TOKEN=${{ secrets.PROD_INIT_TOKEN }}" >> ios/.env
echo "SENTRY_DSN=${{ secrets.SENTRY_DSN }}" >> ios/.env
- name: Create auth.dart
run: sh ./.github/scripts/create_auth_dart.sh
- name: Update packages
run: flutter upgrade
- name: Get dependencies and generate icons
uses: nick-invision/retry@v2
with:
timeout_minutes: 5
max_attempts: 3
command: flutter pub get && flutter pub run huge_icons:generate
retry_wait_seconds: 10
- name: Run Riverpod generator
run: flutter packages pub run build_runner build --delete-conflicting-outputs
- name: Run Pigeon generator
run: flutter pub run pigeon --input pigeon_conf.dart
- name: Decode and place GoogleService-Info.plist
run: echo "${{ secrets.GOOGLE_SERVICE_INFO_PLIST }}" | base64 -d > ios/Runner/GoogleService-Info.plist
- name: Build ios bundle without code signing
run: flutter build ios --release --no-codesign --no-tree-shake-icons
- name: Install Fastlane
run: gem install fastlane
- name: Create Apple API Key JSON
run: echo "$APPLE_API_KEY_JSON" > fastlane/apple_api_key.json
env:
APPLE_API_KEY_JSON: ${{ secrets.APPLE_API_KEY_JSON }}
working-directory: ios
- name: Fastlane Action
run: fastlane ${{ github.event.inputs.lane }}
env:
MATCH_GIT_TOKEN: ${{ secrets.MATCH_GIT_TOKEN }}
STAGING_URL: ${{ secrets.STAGING_URL }}
STAGING_INIT_TOKEN: ${{ secrets.STAGING_INIT_TOKEN }}
PROD_URL: ${{ secrets.PROD_URL }}
PROD_INIT_TOKEN: ${{ secrets.PROD_INIT_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 }}'
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 }}'
MEDITO_APPSTORE_CERTIFICATES_REPO: '${{ secrets.MEDITO_APPSTORE_CERTIFICATES_REPO }}'
FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD: '${{ secrets.FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD }}'
working-directory: ios
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: ios-artifacts
path: ios/build/
- name: Cleanup .env file
run: rm ios/.env