chore(version): bump version to 1.1.1 #36
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release build | |
on: | |
push: | |
tags: | |
- 'v*' | |
env: | |
CI_FLUTTER_VERSION: '3.27.1' # Do NOT remove or rename the variable otherwise will break FDroid workflows. | |
CI_RUST_VERSION: '1.83.0' # Keep a same rust version on all compile targets. | |
jobs: | |
release: | |
name: Create release | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
env: | |
PRERELEASE: ${{ contains(github.ref_name, '-') }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Extract release notes | |
id: extract-release-notes | |
uses: ffurrer2/extract-release-notes@v2 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
prerelease: ${{ env.PRERELEASE }} | |
- name: Create release | |
uses: ncipollo/release-action@v1 | |
with: | |
prerelease: ${{ env.PRERELEASE }} | |
allowUpdates: true | |
omitPrereleaseDuringUpdate: true | |
body: '${{ steps.extract-release-notes.outputs.release_notes }}' | |
build-linux: | |
name: Build Linux | |
needs: [ release ] | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: '17' | |
- uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: ${{env.CI_FLUTTER_VERSION}} | |
cache: true | |
- run: | | |
sudo apt update -y | |
sudo apt install -y ninja-build libgtk-3-dev sqlite3 libsqlite3-dev | |
- name: Precompile | |
run: | | |
git submodule update --init --recursive --force | |
flutter pub get | |
dart ./Makefile.dart | |
- name: Build Linux | |
run: flutter build linux --release | |
- name: Pre Packing | |
run: | | |
pushd build/linux/x64/release/ | |
mv bundle tsdm_client | |
popd | |
- name: Pack Linux tarball | |
uses: thedoctor0/zip-release@master | |
with: | |
type: 'tar' | |
filename: tsdm_client-linux.tar.gz | |
directory: build/linux/x64/release/ | |
path: tsdm_client | |
- name: Release Linux artifacts | |
uses: ncipollo/release-action@v1 | |
with: | |
allowUpdates: true | |
omitBody: true | |
omitBodyDuringUpdate: true | |
omitPrereleaseDuringUpdate: true | |
artifacts: 'build/linux/x64/release/tsdm_client-linux.tar.gz' | |
build-android: | |
name: Build Android | |
needs: [ release ] | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: '17' | |
- uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: ${{env.CI_FLUTTER_VERSION}} | |
cache: true | |
- run: | | |
sudo apt update -y | |
sudo apt install -y ninja-build libgtk-3-dev | |
git submodule update --init --recursive --force | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: ${{env.CI_RUST_VERSION}} | |
targets: aarch64-linux-android,armv7-linux-androideabi,x86_64-linux-android,i686-linux-android | |
- uses: nttld/setup-ndk@v1 | |
id: setup-ndk | |
with: | |
ndk-version: r27c | |
- name: Update NDK path | |
run: | | |
echo "${{ steps.setup-ndk.outputs.ndk-path }}/toolchains/llvm/prebuilt/linux-x86_64/bin" >> $GITHUB_PATH | |
- name: Prepare flutter_avif | |
run: | | |
sudo apt install -y make meson nasm | |
cargo install [email protected] --locked | |
./scripts/build-flutter_avif-android.sh | |
- name: Precompile | |
run: | | |
flutter pub get | |
dart ./Makefile.dart | |
- name: Setup Android sign key | |
run: | | |
echo '${{ secrets.KEYSTORE }}' | base64 --decode > android/app/key.jks | |
echo '${{ secrets.KEY_PROPERTIES }}' > android/key.properties | |
- name: Build Android | |
run: | | |
flutter build apk --release | |
- name: Pack Android apk | |
run: | | |
pushd build/app/outputs/flutter-apk/ | |
mv app-arm64-v8a-release.apk tsdm_client-arm64_v8a.apk | |
mv app-armeabi-v7a-release.apk tsdm_client-armeabi_v7a.apk | |
popd | |
- name: Release Android artifacts | |
uses: ncipollo/release-action@v1 | |
with: | |
allowUpdates: true | |
omitBody: true | |
omitBodyDuringUpdate: true | |
omitPrereleaseDuringUpdate: true | |
artifacts: 'build/app/outputs/flutter-apk/tsdm_client-arm64_v8a.apk,build/app/outputs/flutter-apk/tsdm_client-armeabi_v7a.apk' | |
build-windows: | |
name: Build Windows | |
needs: [ release ] | |
runs-on: windows-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: ${{env.CI_FLUTTER_VERSION}} | |
- name: Precompile | |
shell: pwsh | |
run: | | |
git submodule update --init --recursive --force | |
flutter pub get | |
dart ./Makefile.dart | |
- name: Build Windows | |
run: flutter build windows --release | |
- name: Pre Packing | |
shell: pwsh | |
run: | | |
cd build/windows/x64/runner | |
Rename-Item Release tsdm_client | |
cd ../../../../ | |
- name: Pack Windows tarball | |
uses: thedoctor0/zip-release@master | |
with: | |
type: 'zip' | |
filename: tsdm_client-windows.zip | |
directory: build/windows/x64/runner | |
path: tsdm_client | |
- name: Release Windows artifacts | |
uses: ncipollo/release-action@v1 | |
with: | |
allowUpdates: true | |
omitBody: true | |
omitBodyDuringUpdate: true | |
omitPrereleaseDuringUpdate: true | |
artifacts: 'build/windows/x64/runner/tsdm_client-windows.zip' | |
build-macos-and-ios: | |
name: Build MacOS and iOS | |
needs: [ release ] | |
runs-on: macos-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: ${{env.CI_FLUTTER_VERSION}} | |
cache: true | |
- name: Precompile | |
run: | | |
git submodule update --init --recursive --force | |
flutter pub get | |
dart ./Makefile.dart | |
- name: Build MacOS | |
run: | | |
flutter build macos --release | |
- name: Packing MacOS dmg | |
run: | | |
brew install python-setuptools | |
npm install -g appdmg | |
appdmg appdmg.json build/tsdm_client-universal.dmg | |
- name: Release macOS artifacts | |
uses: ncipollo/release-action@v1 | |
with: | |
allowUpdates: true | |
omitBody: true | |
omitBodyDuringUpdate: true | |
omitPrereleaseDuringUpdate: true | |
artifacts: 'build/tsdm_client-universal.dmg' | |
- name: Build iOS ipa | |
run: | | |
flutter build ios --release --no-codesign | |
- name: Packing | |
run: | | |
mkdir Payload | |
mv build/ios/iphoneos/Runner.app Payload | |
zip -r9 tsdm_client.ipa Payload | |
- name: Release iOS artifacts | |
uses: ncipollo/release-action@v1 | |
with: | |
allowUpdates: true | |
omitBody: true | |
omitBodyDuringUpdate: true | |
omitPrereleaseDuringUpdate: true | |
artifacts: 'tsdm_client.ipa' |