Skip to content

Increase gradle mem size and bump minor version #22

Increase gradle mem size and bump minor version

Increase gradle mem size and bump minor version #22

Workflow file for this run

name: Build and Release app
on:
push:
tags: ["v*.*.*"]
workflow_dispatch:
permissions:
contents: write
jobs:
build-android:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 21
- name: Setup flutter
uses: subosito/flutter-action@v2
with:
channel: "stable"
# - name: Decode Keystore
# run: |
# echo "${{ secrets.KEYSTORE_BASE64 }}" | base64 --decode > android/app/keystore.jks
# - name: Create key.properties
# run: |
# echo "storePassword=${{ secrets.KEYSTORE_PASSWORD }}" > android/key.properties
# echo "keyPassword=${{ secrets.KEY_PASSWORD }}" >> android/key.properties
# echo "keyAlias=${{ secrets.KEY_ALIAS }}" >> android/key.properties
# echo "storeFile=keystore.jks" >> android/key.properties
- name: Build Android apps
run: |
flutter pub get
flutter build apk --split-per-abi
flutter build appbundle
- name: Save android packages
uses: actions/upload-artifact@v4
with:
name: android
path: |
build/app/outputs/flutter-apk/*
build/app/outputs/bundle/release/*
build-windows:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup flutter
uses: subosito/flutter-action@v2
with:
channel: "stable"
- name: Build Windows
run: |
flutter config --enable-windows-desktop
flutter pub get
flutter build windows --release
- name: Save Windows app
uses: actions/upload-artifact@v4
with:
name: win
path: build\windows\x64\runner\Release\*
build-linux:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup flutter
uses: subosito/flutter-action@v2
with:
channel: "stable"
- name: Install devtools
run: |
sudo apt-get update -y
sudo apt-get install -y curl git unzip xz-utils zip libglu1-mesa
sudo apt-get install clang cmake git ninja-build pkg-config libgtk-3-dev liblzma-dev libstdc++-12-dev
sudo apt-get install libwebkit2gtk-4.1-dev
sudo apt-get install curl libcurl4-openssl-dev
sudo apt-get install libayatana-appindicator3-dev
- name: Build Linux
run: |
flutter config --enable-linux-desktop
flutter pub get
flutter build linux --release
- name: Save Linux bundle
uses: actions/upload-artifact@v4
with:
name: linux
path: |
build/linux/x64/release/bundle/*
build-macos:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup flutter
uses: subosito/flutter-action@v2
with:
channel: "stable"
- name: Install CocoaPods
run: |
sudo gem install cocoapods
- name: Build macOS
run: |
flutter config --enable-macos-desktop
flutter pub get
pod install --project-directory=macos
flutter build macos --release
- name: Save macOS app
uses: actions/upload-artifact@v4
with:
name: macos
path: build/macos/Build/Products/Release/*.app
release:
runs-on: ubuntu-latest
needs: [build-android, build-windows, build-linux, build-macos]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get all build outputs
uses: actions/download-artifact@v4
with:
path: exec/
- name: Zip Windows programs
run: 7z a -tZip SyncVault-${{ github.ref_name }}-windows.zip exec/win
- name: Zip Linux bundle
run: tar -czvf SyncVault-${{ github.ref_name }}-linux.tar.gz exec/linux
- name: Zip macOS app
run: tar -czvf SyncVault-${{ github.ref_name }}-macos.tar.gz exec/macos
- name: Display structure of downloaded files
run: tree exec/
- name: Create release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
name: SyncVault
prerelease: true
generate_release_notes: true
files: |
exec/android/bundle/release/app-release.aab
exec/android/flutter-apk/*
SyncVault-${{ github.ref_name }}-windows.zip
SyncVault-${{ github.ref_name }}-linux.tar.gz
SyncVault-${{ github.ref_name }}-macos.tar.gz
body_path: CHANGELOG.md
token: ${{ secrets.GITHUB_TOKEN }}
env:
GITHUB_REPOSITORY: dhzdhd/SyncVault