Skip to content

Merge pull request #10 from ConcenTech:0.3.0_fix-build-scripts #6

Merge pull request #10 from ConcenTech:0.3.0_fix-build-scripts

Merge pull request #10 from ConcenTech:0.3.0_fix-build-scripts #6

name: Build Release
on:
push:
branches:
- main
paths:
- "lib/**"
- "video_player/lib/**"
jobs:
build_android:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup the Java environment
uses: actions/setup-java@v4
with:
distribution: oracle
java-version: "17"
- name: Setup the flutter environment
uses: subosito/flutter-action@v2
with:
channel: "stable"
- name: Create signing key
uses: timheuer/[email protected]
with:
fileDir: "/home/runner/work/album_share/android/"
fileName: "keystore.jks"
encodedString: ${{ secrets.ANDROID_KEY_BASE64 }}
- name: Create key.properties
run: |
echo "storePassword=${{ secrets.ANDROID_KEYSTORE_PASSWORD }}" > android/key.properties
echo "keyPassword=${{ secrets.ANDROID_KEYSTORE_PASSWORD }}" >> android/key.properties
echo "keyAlias=${{ secrets.ANDROID_KEY_ALIAS }}" >> android/key.properties
echo "storeFile=/home/runner/work/album_share/android/keystore.jks" >> android/key.properties
- name: Build appbundle
run: |
flutter pub get
flutter build appbundle
- name: Rename bundle
run: mv build/app/outputs/bundle/release/app-release.aab build/app/outputs/bundle/release/AlbumShare-{{github.ref_name}}-android.aab
- name: Create symbols archive
uses: thedoctor0/[email protected]
with:
type: "zip"
filename: AlbumShare-{{github.ref_name}}-android-symbols.zip
directory: build/app/intermediates/merged_natove_libs/release/out/lib/
- name: Add files to release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: |
build/app/intermediates/merged_natove_libs/release/out/lib/AlbumShare-{{github.ref_name}}-android-symbols.zip
build/app/outputs/bundle/release/AlbumShare-{{github.ref_name}}-android.aab
build_linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install flutter dependencies
run: sudo apt-get install -y clang cmake ninja-build pkg-config libgtk-3-0 libgtk-3-dev libblkid1 liblzma5 libmpv-dev mpv
- name: Setup the flutter environment
uses: subosito/flutter-action@v2
with:
channel: "stable"
- name: Install project dependencies
run: flutter pub get
- name: Generate build files
run: dart run build_runner build --delete-conflicting-outputs
- name: Build
run: flutter build linux --release
- name: Creative archive
uses: thedoctor0/[email protected]
with:
type: "zip"
filename: AlbumShare-{{github.ref_name}}-linux.zip
directory: build/linux/x64/release/bundle
- name: Add archive to release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: build/linux/x64/release/bundle/AlbumShare-{{github.ref_name}}-linux.zip
build_windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup the flutter environment
uses: subosito/flutter-action@v2
with:
channel: "stable"
- name: Install project dependencies
run: flutter pub get
- name: Generate build files
run: dart run build_runner build --delete-conflicting-outputs
- name: Build
run: flutter build windows --release
- name: Creative archive
uses: thedoctor0/[email protected]
with:
type: "zip"
filename: AlbumShare-{{github.ref_name}}-windows.zip
directory: build/windows/x64/runner/Release
- name: Add archive to release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: build/windows/x64/runner/Release/AlbumShare-{{github.ref_name}}-windows.zip
# build_macos:
# runs-on: macos-latest
# steps:
# - uses: actions/checkout@v4
# - name: Setup the flutter environment
# uses: subosito/flutter-action@v2
# with:
# channel: "stable"
# - name: Install project dependencies
# run: flutter pub get
# - name: Generate build files
# run: dart run build_runner build --delete-conflicting-outputs
# - name: Build
# run: flutter build macos --release
# - name: Creative archive
# uses: thedoctor0/[email protected]
# with:
# type: "zip"
# filename: AlbumShare-{{github.ref_name}}-macos.zip
# directory: build/macos/Build/Products/Release
# - name: Add archive to release
# uses: softprops/action-gh-release@v2
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# files: build/macos/Build/Products/Release/AlbumShare-{{github.ref_name}}-macos.zip
# build_ios:
# runs-on: macos-latest
# steps: