2023-05-02 17:50:07 +03:00
|
|
|
name: "Release Build"
|
|
|
|
|
|
|
|
on:
|
2024-01-22 00:29:57 -08:00
|
|
|
workflow_dispatch:
|
2023-05-02 17:50:07 +03:00
|
|
|
push:
|
2024-01-22 00:29:57 -08:00
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
- dev
|
2024-01-28 18:19:56 -08:00
|
|
|
paths:
|
|
|
|
- ".github/workflows/release-build.yml"
|
|
|
|
- "android/**"
|
|
|
|
- "assets/**"
|
|
|
|
- "lib/**"
|
2024-01-31 17:57:15 -08:00
|
|
|
- ".releaserc.js"
|
2024-01-28 18:19:56 -08:00
|
|
|
- "pubspec.yaml"
|
2024-01-31 17:57:15 -08:00
|
|
|
|
2023-05-02 17:50:07 +03:00
|
|
|
jobs:
|
|
|
|
release:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-09-10 14:43:58 +07:00
|
|
|
- uses: actions/checkout@v4
|
2024-01-22 00:29:57 -08:00
|
|
|
|
2023-10-28 07:19:07 -07:00
|
|
|
- name: Set up JDK
|
2023-12-05 09:43:04 +07:00
|
|
|
uses: actions/setup-java@v4
|
2023-05-02 17:50:07 +03:00
|
|
|
with:
|
2023-10-28 07:19:07 -07:00
|
|
|
java-version: "17"
|
2023-05-02 17:50:07 +03:00
|
|
|
distribution: "zulu"
|
2024-01-22 00:29:57 -08:00
|
|
|
|
2023-05-02 17:50:07 +03:00
|
|
|
- uses: subosito/flutter-action@v2
|
|
|
|
with:
|
|
|
|
channel: "stable"
|
2024-01-22 00:29:57 -08:00
|
|
|
|
|
|
|
- name: Cache Node modules
|
|
|
|
uses: actions/cache@v3
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
node_modules
|
|
|
|
key: npm-${{ hashFiles('package-lock.json') }}
|
|
|
|
|
|
|
|
- name: Setup semantic-release
|
|
|
|
run: npm install
|
|
|
|
|
2023-05-02 17:50:07 +03:00
|
|
|
- name: Set up Flutter
|
|
|
|
run: flutter pub get
|
2024-01-22 00:29:57 -08:00
|
|
|
|
2023-05-02 17:50:07 +03:00
|
|
|
- name: Generate files with Builder
|
2023-11-11 17:14:54 +07:00
|
|
|
run: dart run build_runner build --delete-conflicting-outputs
|
2024-01-22 00:29:57 -08:00
|
|
|
|
2023-05-02 17:50:07 +03:00
|
|
|
- name: Build with Flutter
|
2024-01-31 17:57:15 -08:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
signingKey: "keystore.jks"
|
2023-05-02 17:50:07 +03:00
|
|
|
keyStorePassword: ${{ secrets.SIGNING_KEYSTORE_PASSWORD }}
|
|
|
|
keyAlias: ${{ secrets.SIGNING_KEY_ALIAS }}
|
|
|
|
keyPassword: ${{ secrets.SIGNING_KEY_PASSWORD }}
|
2024-01-31 17:57:15 -08:00
|
|
|
run: |
|
|
|
|
echo "${{ secrets.SIGNING_KEYSTORE }}" | base64 --decode > android/app/keystore.jks
|
|
|
|
npx semantic-release
|