Merge pull request #553 from hpi-studyu/johannesvedder-patch-1 #7
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 apps | |
on: | |
push: | |
branches: | |
- main | |
- dev | |
paths: | |
- 'app/**' | |
- 'core/**' | |
- 'flutter_common/**' | |
workflow_dispatch: | |
jobs: | |
play-store-release: | |
name: Create Play Store Release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Await potential publishing on Pub.dev | |
uses: johannesvedder/await-workflow@v1 | |
with: | |
workflowId: 'publish_pubdev.yml' | |
- name: Get the tag name | |
run: echo "TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up ruby env | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 3.2.1 | |
bundler-cache: true | |
working-directory: './app/android' | |
- name: Decrypt files | |
id: decrypt_files | |
run: | | |
echo "${{ secrets.STUDYU_ANDROID_KEYSTORE }}" > keystore.jks.asc | |
gpg -d --passphrase "${{ secrets.STUDYU_ANDROID_KEYSTORE_PASSWORD }}" --batch keystore.jks.asc > app/android/studyu-keystore.jks | |
echo "${{ secrets.STUDYU_KEY_PROPERTIES}}" > app/android/key.properties | |
- name: Set up flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: stable | |
- name: Build StudyU app bundle | |
run: flutter build appbundle --no-tree-shake-icons --build-number ${{ github.run_number }} | |
working-directory: ./app | |
- name: Fastlane upload | |
uses: maierj/[email protected] | |
with: | |
lane: 'internal' | |
subdirectory: './app/android' | |
env: | |
PLAY_CREDS_JSON: ${{ secrets.PLAY_CREDS_JSON }} | |
app-store-release: | |
name: Create App Store Release | |
runs-on: macos-latest | |
steps: | |
- name: Await potential publishing on Pub.dev | |
uses: johannesvedder/await-workflow@v1 | |
with: | |
workflowId: 'publish_pubdev.yml' | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up ruby env | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 3.2.1 | |
bundler-cache: true | |
working-directory: './app/ios' | |
- name: Set up flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: stable | |
- name: Build StudyU ios without codesign | |
run: flutter build ios --no-codesign --no-tree-shake-icons --build-number ${{ github.run_number }} | |
working-directory: ./app | |
- name: Fastlane upload | |
uses: maierj/[email protected] | |
with: | |
lane: 'upload_testflight' | |
subdirectory: './app/ios' | |
env: | |
FASTLANE_APP_IOS_KEY_ID: ${{ secrets.FASTLANE_APP_IOS_KEY_ID }} | |
FASTLANE_APP_IOS_ISSUER_ID: ${{ secrets.FASTLANE_APP_IOS_ISSUER_ID }} | |
FASTLANE_APP_IOS_KEY_CONTENT: ${{ secrets.FASTLANE_APP_IOS_KEY_CONTENT }} | |
FASTLANE_APP_IOS_MATCH_GIT_URL: ${{ secrets.FASTLANE_APP_IOS_MATCH_GIT_URL }} | |
FASTLANE_APP_IOS_MATCH_GIT_PRIVATE_KEY: ${{ secrets.FASTLANE_APP_IOS_MATCH_GIT_PRIVATE_KEY }} | |
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} | |
TEMP_KEYCHAIN_USER: ${{ secrets.TEMP_KEYCHAIN_USER }} | |
TEMP_KEYCHAIN_PASSWORD: ${{ secrets.TEMP_KEYCHAIN_PASSWORD }} |