Skip to content

Commit

Permalink
chore: refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
tuanngocptn committed Apr 19, 2024
1 parent 8842c47 commit 271af54
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions .github/workflows/vtd-trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ jobs:
strategy:
fail-fast: true
matrix:
machine: ${{ fromJson(needs.pre-deployment.outputs.matrix) }}
runs-on: ${{ matrix.machine.name }}
include: ${{ fromJson(needs.pre-deployment.outputs.matrix) }}
runs-on: ${{ matrix.name }}
needs: [pre-deployment]
timeout-minutes: 60
steps:
Expand All @@ -96,17 +96,17 @@ jobs:

- name: Set up JDK 17
uses: actions/setup-java@v4
if: matrix.machine.format != 'IPA'
if: matrix.format != 'IPA'
with:
java-version: "17"
distribution: "temurin"

- name: Setup Android SDK
if: matrix.machine.format != 'IPA'
if: matrix.format != 'IPA'
uses: android-actions/setup-android@v3

- name: setup-cocoapods
if: matrix.machine.format == 'IPA'
if: matrix.format == 'IPA'
uses: maxim-lobanov/setup-cocoapods@v1
with:
version: 1.14.3
Expand All @@ -125,15 +125,15 @@ jobs:
run: flutter pub run flutter_launcher_icons:main

- name: Build APK
if: matrix.machine.format == 'APK'
if: matrix.format == 'APK'
run: flutter build apk

- name: Build AAB
if: matrix.machine.format == 'AAB'
if: matrix.format == 'AAB'
run: flutter build appbundle

- name: Cache Primes
if: matrix.machine.format == 'IPA'
if: matrix.format == 'IPA'
id: cache-primes
uses: actions/cache@v4
with:
Expand All @@ -143,12 +143,12 @@ jobs:
key: vtd-cache-pods-${{ hashFiles('pubspec.lock') }}

- name: Pod install
if: ${{ (matrix.machine.format == 'IPA') && (steps.cache-primes.outputs.cache-hit != 'true') }}
if: ${{ (matrix.format == 'IPA') && (steps.cache-primes.outputs.cache-hit != 'true') }}
working-directory: ios
run: pod install

- name: Install certificate and provision
if: matrix.machine.format == 'IPA'
if: matrix.format == 'IPA'
run: |
# create variables
CERTIFICATE_PATH=$GITHUB_WORKSPACE/.github/scripts/data/certificates/distribution.p12
Expand All @@ -170,11 +170,11 @@ jobs:
cp $PP_PATH/* ~/Library/MobileDevice/Provisioning\ Profiles
- name: Build ipa
if: matrix.machine.format == 'IPA'
if: matrix.format == 'IPA'
run: flutter build ipa --release --export-options-plist ios/export.plist

- name: Deploy ipa
if: matrix.machine.format == 'IPA'
if: matrix.format == 'IPA'
uses: maierj/[email protected]
with:
lane: "ios beta"
Expand All @@ -183,11 +183,11 @@ jobs:
uses: PacificPromise/macos-telegram-action@main
with:
type: topic
message: "✅ - Buid Success ${{ matrix.machine.format }}: ${{ needs.pre-deployment.outputs.message-information }}"
message: "✅ - Buid Success ${{ matrix.format }}: ${{ needs.pre-deployment.outputs.message-information }}"

- name: Send message failure
if: failure()
uses: PacificPromise/macos-telegram-action@main
with:
type: topic
message: "💥 - Failure ${{ matrix.machine.format }}: ${{ needs.pre-deployment.outputs.message-information }}"
message: "💥 - Failure ${{ matrix.format }}: ${{ needs.pre-deployment.outputs.message-information }}"

0 comments on commit 271af54

Please sign in to comment.