ente/.github/workflows/mobile-release.yml

64 lines
2.3 KiB
YAML
Raw Normal View History

2024-03-05 14:07:51 +00:00
name: "Release (photos independent)"
on:
workflow_dispatch: # Allow manually running the action
push:
# Run when a tag matching the pattern "photos-v*"" is pushed
# See: [Note: Testing release workflows that are triggered by tags]
tags:
- "photos-v*"
env:
2024-04-20 09:41:09 +00:00
FLUTTER_VERSION: "3.19.3"
2024-03-05 14:07:51 +00:00
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: mobile
steps:
- name: Checkout code and submodules
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
2024-03-05 14:07:51 +00:00
- name: Install Flutter ${{ env.FLUTTER_VERSION }}
uses: subosito/flutter-action@v2
with:
channel: "stable"
flutter-version: ${{ env.FLUTTER_VERSION }}
cache: true
- name: Setup keys
uses: timheuer/base64-to-file@v1
with:
fileName: "keystore/ente_photos_key.jks"
encodedString: ${{ secrets.SIGNING_KEY_PHOTOS }}
- name: Build independent APK
2024-03-13 05:57:24 +00:00
run: |
flutter build apk --release --flavor independent
mv build/app/outputs/flutter-apk/app-independent-release.apk build/app/outputs/flutter-apk/ente-${{ github.ref_name }}.apk
2024-03-05 14:07:51 +00:00
env:
SIGNING_KEY_PATH: "/home/runner/work/_temp/keystore/ente_photos_key.jks"
SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS_PHOTOS }}
SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD_PHOTOS }}
SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD_PHOTOS }}
- name: Checksum
2024-03-13 06:52:11 +00:00
run: sha256sum build/app/outputs/flutter-apk/ente-${{ github.ref_name }}.apk > build/app/outputs/flutter-apk/sha256sum
2024-03-05 14:07:51 +00:00
- name: Create a draft GitHub release
uses: ncipollo/release-action@v1
with:
2024-03-13 05:57:24 +00:00
artifacts: "mobile/build/app/outputs/flutter-apk/ente-${{ github.ref_name }}.apk,mobile/build/app/outputs/flutter-apk/sha256sum"
2024-03-05 14:07:51 +00:00
draft: true