mirror of
https://github.com/immich-app/immich.git
synced 2024-12-23 02:06:15 +02:00
6c3bfc6f0f
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
76 lines
2.0 KiB
YAML
76 lines
2.0 KiB
YAML
name: Build Mobile
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
workflow_call:
|
|
inputs:
|
|
ref:
|
|
required: false
|
|
type: string
|
|
pull_request:
|
|
push:
|
|
branches: [main]
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
build-sign-android:
|
|
name: Build and sign Android
|
|
# Skip when PR from a fork
|
|
if: ${{ !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }}
|
|
runs-on: macos-13
|
|
|
|
steps:
|
|
- name: Determine ref
|
|
id: get-ref
|
|
run: |
|
|
input_ref="${{ inputs.ref }}"
|
|
github_ref="${{ github.sha }}"
|
|
ref="${input_ref:-$github_ref}"
|
|
echo "ref=$ref" >> $GITHUB_OUTPUT
|
|
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
ref: ${{ steps.get-ref.outputs.ref }}
|
|
|
|
- uses: actions/setup-java@v4
|
|
with:
|
|
distribution: "zulu"
|
|
java-version: "12.x"
|
|
cache: "gradle"
|
|
|
|
- name: Setup Flutter SDK
|
|
uses: subosito/flutter-action@v2
|
|
with:
|
|
channel: "stable"
|
|
flutter-version: "3.13.6"
|
|
cache: true
|
|
|
|
- name: Create the Keystore
|
|
env:
|
|
KEY_JKS: ${{ secrets.KEY_JKS }}
|
|
working-directory: ./mobile
|
|
run: echo $KEY_JKS | base64 -d > android/key.jks
|
|
|
|
- name: Get Packages
|
|
working-directory: ./mobile
|
|
run: flutter pub get
|
|
|
|
- name: Build Android App Bundle
|
|
working-directory: ./mobile
|
|
env:
|
|
ALIAS: ${{ secrets.ALIAS }}
|
|
ANDROID_KEY_PASSWORD: ${{ secrets.ANDROID_KEY_PASSWORD }}
|
|
ANDROID_STORE_PASSWORD: ${{ secrets.ANDROID_STORE_PASSWORD }}
|
|
run: |
|
|
flutter build apk --release
|
|
flutter build apk --release --split-per-abi --target-platform android-arm,android-arm64,android-x64
|
|
|
|
- name: Publish Android Artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: release-apk-signed
|
|
path: mobile/build/app/outputs/flutter-apk/*.apk
|