Skip to content

Commit

Permalink
refactor: use matrix strategy for upload workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
2paperstar committed Sep 15, 2023
1 parent 3cbeff5 commit 2130467
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 66 deletions.
31 changes: 0 additions & 31 deletions .github/workflows/android_upload.yml

This file was deleted.

35 changes: 0 additions & 35 deletions .github/workflows/ios_upload.yml

This file was deleted.

57 changes: 57 additions & 0 deletions .github/workflows/upload.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: build and publish (Android, iOS)

on:
push:
branches:
- main

jobs:
build-and-upload:
strategy:
fail-fast: false
matrix:
build-os: [ubuntu-latest, macos-latest]
include:
- os: Android
build-os: ubuntu-latest
- os: iOS
build-os: macos-latest
name: Build ${{ matrix.os }} App and Upload
runs-on: ${{ matrix.build-os }}
concurrency:
group: ${{ matrix.os }}-staging
cancel-in-progress: true
steps:
- uses: actions/checkout@v3
- name: setup env
run: |
echo "directory=$(echo ${{ matrix.os }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
- name: Write Keystore
if: matrix.os == 'Android'
run: |
echo ${{ secrets.KEYSTORE }} | base64 --decode > android/app/upload-keystore.jks
echo "${{ secrets.KEYSTORE_PROPERTIES }}" > android/key.properties
- uses: shimataro/ssh-key-action@v2
if: matrix.os == 'iOS'
with:
key: ${{ secrets.CERTIFICATION_DEPLOY_KEY }}
known_hosts: ${{ secrets.KNOWN_HOSTS }}
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2.0'
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.13.0'
channel: 'stable'
- name: Run Fastlane
run: |
bundle install
bundle exec fastlane internal
env:
APP_STORE_CONNECT_API_KEY_KEY_ID: ${{ secrets.APP_STORE_CONNECT_KEY_ID }}
APP_STORE_CONNECT_API_KEY_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_ISSUER_ID }}
APP_STORE_CONNECT_API_KEY_KEY: ${{ secrets.APP_STORE_CONNECT_KEY_CONTENT }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
MATCH_GIT_URL: ${{ secrets.MATCH_GIT_URL }}
SUPPLY_JSON_KEY_DATA: ${{ secrets.SUPPLY_JSON_KEY_DATA }}
working-directory: ${{ env.directory }}

0 comments on commit 2130467

Please sign in to comment.