release #17
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" | |
on: | |
push: | |
tags: | |
- "1.*" | |
workflow_dispatch: | |
inputs: | |
logLevel: | |
description: 'Log level' | |
required: true | |
default: 'warning' | |
jobs: | |
flutter-build: | |
name: "Release" | |
runs-on: "windows-latest" | |
permissions: write-all | |
steps: | |
- name: Clone repository | |
uses: actions/checkout@v4 | |
- run: | | |
$tag = "${{ github.ref }}".Replace('refs/tags/', '') | |
echo "tag=$(echo $tag)" >> $env:GITHUB_ENV | |
- run: echo "bilineo_windows_${env:tag}.zip build progress" | |
- run: echo "bilineo_android_${env:tag}.apk build progress" | |
- run: choco install yq | |
- name: Set up Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: stable | |
flutter-version-file: pubspec.yaml | |
cache-key: "flutter-:os:-:channel:-:version:-:arch:-:hash:" # optional, change this to force refresh cache | |
cache-path: "${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:" # optional, change this to specify the cache path | |
pub-cache-key: "flutter-pub:os:-:channel:-:version:-:arch:-:hash:" # optional, change this to force refresh cache of dart pub get dependencies | |
pub-cache-path: "${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:" # optional, change this to specify the cache path | |
- name: Set up Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '18' | |
- run: flutter pub get | |
- run: flutter build apk --split-per-abi | |
- run: flutter build windows | |
- run: | | |
Compress-Archive build/windows/x64/runner/Release bilineo_windows_${env:tag}.zip | |
Ren build/app/outputs/flutter-apk/app-arm64-v8a-release.apk bilineo_android_${env:tag}.apk | |
- uses: "marvinpinto/action-automatic-releases@latest" | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
prerelease: false | |
files: | | |
bilineo_windows_*.zip | |
build/app/outputs/flutter-apk/bilineo_android_*.apk | |
- name: Upload outputs | |
uses: actions/upload-artifact@v4 | |
with: | |
name: outputs | |
path: | | |
bilineo_windows_*.zip | |
build/app/outputs/flutter-apk/bilineo_android_*.apk | |
flutter-build-linux: | |
name: "Release for Linux" | |
needs: flutter-build | |
runs-on: "ubuntu-latest" | |
steps: | |
- name: Clone repository | |
uses: actions/checkout@v4 | |
- name: Extract tag name | |
run: echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV | |
shell: bash | |
- name: Echo build progress | |
run: echo "bilineo_linux_${{ env.tag }}.tar.gz build progress" | |
shell: bash | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y clang cmake libgtk-3-dev ninja-build libayatana-appindicator3-dev mpv | |
shell: bash | |
- name: Set up Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: stable | |
flutter-version-file: pubspec.yaml | |
- name: Get Flutter dependencies | |
run: flutter pub get | |
shell: bash | |
- name: Build Flutter for Linux | |
run: flutter build linux | |
shell: bash | |
- name: Package build output | |
run: tar -zcvf bilineo_linux_${{ env.tag }}.tar.gz build/linux/x64/release/bundle/* | |
shell: bash | |
- name: Create release | |
uses: "marvinpinto/action-automatic-releases@latest" | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
prerelease: false | |
files: | | |
bilineo_linux_*.tar.gz | |
- name: Upload outputs | |
uses: actions/upload-artifact@v4 | |
with: | |
name: outputs-linux | |
path: bilineo_linux_*.tar.gz |