2022-10-25 19:59:56 +00:00
|
|
|
# This workflow uses actions that are not certified by GitHub.
|
|
|
|
# They are provided by a third-party and are governed by
|
|
|
|
# separate terms of service, privacy policy, and support
|
|
|
|
# documentation.
|
|
|
|
|
2023-05-04 13:44:00 +00:00
|
|
|
name: PR check
|
2022-10-25 19:59:56 +00:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2023-03-30 19:24:18 +00:00
|
|
|
branches: ["main"]
|
2022-10-25 19:59:56 +00:00
|
|
|
pull_request:
|
2023-03-30 19:24:18 +00:00
|
|
|
branches: ["main"]
|
2022-10-25 19:59:56 +00:00
|
|
|
|
|
|
|
jobs:
|
2025-01-27 18:40:38 +00:00
|
|
|
pr-id:
|
|
|
|
name: Get PR id
|
2024-04-12 08:43:19 +00:00
|
|
|
runs-on: macos-14
|
2023-10-20 14:12:43 +00:00
|
|
|
timeout-minutes: 10
|
2025-01-27 18:40:38 +00:00
|
|
|
outputs:
|
|
|
|
pull-request-id: ${{ steps.pull-request-id-step.outputs.id }}
|
2022-10-25 19:59:56 +00:00
|
|
|
steps:
|
2023-09-20 09:58:04 +00:00
|
|
|
- uses: 8BitJonny/gh-get-current-pr@2.2.0
|
|
|
|
id: PR
|
|
|
|
|
2025-01-27 18:40:38 +00:00
|
|
|
- id: pull-request-id-step
|
|
|
|
run: echo "id=${{ steps.PR.outputs.number }}" >> "$GITHUB_OUTPUT"
|
2023-03-30 19:24:18 +00:00
|
|
|
|
2025-01-27 18:40:38 +00:00
|
|
|
analyze-and-test:
|
|
|
|
name: Analyze & test
|
|
|
|
needs: [pr-id]
|
|
|
|
uses: ./.github/workflows/analyze_and_test.yml
|
|
|
|
secrets: inherit
|
|
|
|
with:
|
2025-01-27 18:46:03 +00:00
|
|
|
is-fork: ${{ needs.pr-id.outputs.pull-request-id != 'null' && github.event.pull_request.head.repo.full_name != github.repository }}
|
2025-01-21 18:43:14 +00:00
|
|
|
|
|
|
|
platform-changes:
|
|
|
|
name: Checks for platform changes
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
outputs:
|
|
|
|
android-changed: ${{ steps.platform-changes.outputs.android-changed }}
|
|
|
|
ios-changed: ${{ steps.platform-changes.outputs.ios-changed }}
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
|
|
|
|
- id: platform-changes
|
|
|
|
uses: dorny/paths-filter@v2
|
|
|
|
with:
|
|
|
|
filters: |
|
|
|
|
android-changed:
|
|
|
|
- 'android/**'
|
|
|
|
- 'pubspec.yaml'
|
|
|
|
ios-changed:
|
|
|
|
- 'ios/**'
|
|
|
|
- 'pubspec.yaml'
|
|
|
|
|
|
|
|
build-android:
|
|
|
|
name: Build Android
|
|
|
|
needs: platform-changes
|
|
|
|
if: needs.platform-changes.outputs.android-changed == 'true'
|
|
|
|
uses: ./.github/workflows/build_apk.yml
|
|
|
|
secrets: inherit
|
|
|
|
with:
|
|
|
|
binary-type: apk
|
|
|
|
flavor: prod
|
2025-01-27 12:37:13 +00:00
|
|
|
upload-artifact: false
|
2025-01-21 18:43:14 +00:00
|
|
|
stage-backend: false
|
|
|
|
version: "1.0.0"
|
|
|
|
|
|
|
|
build-ios:
|
|
|
|
name: Build iOS
|
|
|
|
needs: platform-changes
|
|
|
|
if: needs.platform-changes.outputs.ios-changed == 'true'
|
|
|
|
uses: ./.github/workflows/build_ipa.yml
|
|
|
|
secrets: inherit
|
|
|
|
with:
|
2025-01-27 12:37:13 +00:00
|
|
|
upload-artifact: false
|
2025-01-21 18:43:14 +00:00
|
|
|
stage-backend: false
|
|
|
|
version: "1.0.0"
|