Skip to content

Build & Release

Build & Release #148

Workflow file for this run

name: "Build & Release"
on:
workflow_dispatch:
branches: main
jobs:
build:
name: Build & Release
runs-on: windows-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup-Java
uses: actions/setup-java@v3.12.0
with:
distribution: 'oracle'
java-version: '17'
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.24.0'
channel: 'stable'
- name: Install Dependencies
run: flutter pub get
- name: Create keystore file
run: |
$b64 = "${{ secrets.KEY_STORE }}"
$filename = "./android/bloomee.jks"
$bytes = [Convert]::FromBase64String($b64)
[IO.File]::WriteAllBytes($filename, $bytes)
# run: echo "${{ secrets.KEY_STORE }}" | base64 --decode > ./android/bloomee.jks
- name: Create Keystore properties
run: |
echo keyPassword=\${{ secrets.KEY_PASSWORD }} > ./android/key.properties
echo storePassword=\${{ secrets.STORE_PASSWORD }} >> ./android/key.properties
echo keyAlias=\${{ secrets.KEY_ALIAS }} >> ./android/key.properties
- name: Build App files
run: flutter build apk --release --split-per-abi --build-number ${{github.run_number}}
- name: Verify Sign
run: |
jarsigner --verify --verbose build/app/outputs/flutter-apk/app-release.apk
jarsigner --verify --verbose build/app/outputs/flutter-apk/app-x86-release.apk
jarsigner --verify --verbose build/app/outputs/flutter-apk/app-armeabi-v7a-release.apk
jarsigner --verify --verbose build/app/outputs/flutter-apk/app-arm64-v8a-release.apk
jarsigner --verify --verbose build/app/outputs/flutter-apk/app-x86_64-release.apk
- name: Rename APK file
run: |
Rename-Item -Path "build/app/outputs/flutter-apk/app-release.apk" -NewName "bloomee_tunes_android_v2.10.5+${{github.run_number}}_universal.apk"
Rename-Item -Path "build/app/outputs/flutter-apk/app-x86-release.apk" -NewName "bloomee_tunes_android_v2.10.5+${{github.run_number}}_x86.apk"
Rename-Item -Path "build/app/outputs/flutter-apk/app-armeabi-v7a-release.apk" -NewName "bloomee_tunes_android_v2.10.5+${{github.run_number}}_armeabi-v7a.apk"
Rename-Item -Path "build/app/outputs/flutter-apk/app-arm64-v8a-release.apk" -NewName "bloomee_tunes_android_v2.10.5+${{github.run_number}}_arm64-v8a.apk"
Rename-Item -Path "build/app/outputs/flutter-apk/app-x86_64-release.apk" -NewName "bloomee_tunes_android_v2.10.5+${{github.run_number}}_x86_64.apk"
- name: Build Windows App
run: flutter build windows --release --build-number ${{github.run_number}}
- name: Create build-number.txt file
run: echo ${{github.run_number}} > build-number.txt
- name: Rename file
run: Rename-Item -Path "build/windows/x64/runner/Release/bloomee.exe" -NewName "Bloomee.exe"
- name: ZIP build
run: Compress-Archive -Path build/windows/x64/runner/Release/* -Destination build/windows/x64/bloomee_tunes_windows_x64_v2.10.5+${{github.run_number}}.zip
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: Release
path: |
build/app/outputs/flutter-apk/bloomee_tunes_android_v2.10.5+${{github.run_number}}_universal.apk
build/windows/x64/bloomee_tunes_windows_x64_v2.10.5+${{github.run_number}}.zip
build/app/outputs/flutter-apk/bloomee_tunes_android_v2.10.5+${{github.run_number}}_x86.apk
build/app/outputs/flutter-apk/bloomee_tunes_android_v2.10.5+${{github.run_number}}_armeabi-v7a.apk
build/app/outputs/flutter-apk/bloomee_tunes_android_v2.10.5+${{github.run_number}}_arm64-v8a.apk
build/app/outputs/flutter-apk/bloomee_tunes_android_v2.10.5+${{github.run_number}}_x86_64.apk
- name: Create Release
uses: ncipollo/release-action@v1
with:
artifacts: |
build/app/outputs/flutter-apk/bloomee_tunes_android_v2.10.5+${{github.run_number}}_universal.apk
build/windows/x64/bloomee_tunes_windows_x64_v2.10.5+${{github.run_number}}.zip
build/app/outputs/flutter-apk/bloomee_tunes_android_v2.10.5+${{github.run_number}}_x86.apk
build/app/outputs/flutter-apk/bloomee_tunes_android_v2.10.5+${{github.run_number}}_armeabi-v7a.apk
build/app/outputs/flutter-apk/bloomee_tunes_android_v2.10.5+${{github.run_number}}_arm64-v8a.apk
build/app/outputs/flutter-apk/bloomee_tunes_android_v2.10.5+${{github.run_number}}_x86_64.apk
build-number.txt
tag: v2.10.5+${{github.run_number}}
token: ${{secrets.SECRET_KEY}}
prerelease: true