🔖 v1.2.2 #27
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: Build Apps | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
on: | |
workflow_dispatch: | |
inputs: | |
TAG: | |
description: 'Set a Tag' | |
required: true | |
default: '' | |
push: | |
tags: | |
- v* | |
jobs: | |
build-apks-and-linux-app: | |
name: Release Apks/LinuxApp | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup JDK | |
uses: actions/setup-java@v1 | |
with: | |
java-version: '11.x' | |
- name: Setup flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: stable | |
- name: Build apks | |
run: | | |
\cp -f pubspec.yaml assets/ | |
flutter pub get | |
flutter build apk --release --tree-shake-icons | |
flutter build apk --target-platform android-arm,android-arm64,android-x64 --split-per-abi --release --tree-shake-icons | |
mkdir -p releases | |
mv -f build/app/outputs/flutter-apk/*-release.apk releases | |
mv -f releases/app-release.apk releases/app-universal-release.apk | |
- name: Sign build apk | |
uses: iota9star/sign-android-release@v1.0.5 | |
with: | |
releaseDirectory: releases | |
fileRegex: .*-release.apk | |
signingKeyBase64: ${{ secrets.SIGNING_KEY }} | |
alias: ${{ secrets.ALIAS }} | |
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }} | |
keyPassword: ${{ secrets.KEY_PASSWORD }} | |
- name: Rename signed apk | |
run: | | |
for name in $(ls releases/*-signed.apk);do mv -f $name ${name%-signed.apk}.apk ;done | |
- name: Build linux app | |
run: | | |
sudo apt-get install bash curl file unzip xz-utils zip libglu1-mesa clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev -y | |
flutter pub get | |
flutter config --enable-linux-desktop | |
flutter build linux --release | |
cd build/linux/x64/release/bundle | |
zip -r linux-release.zip ./ | |
mv linux-release.zip ../../../../../ | |
- name: Release to github | |
uses: ncipollo/release-action@v1 | |
with: | |
allowUpdates: true | |
artifacts: "releases/*-release.apk,linux-release.zip" | |
token: ${{ secrets.ACTION_TOKEN }} | |
tag: ${{ github.event.inputs.TAG }} | |
build-windows-app: | |
name: Release Windows | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: stable | |
- name: Build windows | |
run: | | |
Copy-Item -Path pubspec.yaml -Destination assets -Force | |
flutter pub get | |
flutter config --enable-windows-desktop | |
flutter build windows --release --tree-shake-icons | |
Compress-Archive -Path build/windows/runner/Release/* windows-win32-release.zip -Force | |
& "${env:ProgramFiles(x86)}\Inno Setup 6\iscc.exe" windows_inno_setup.iss | |
- name: Release build | |
uses: ncipollo/release-action@v1 | |
with: | |
allowUpdates: true | |
artifacts: "windows-win32-release.zip,mikan_setup.exe" | |
token: ${{ secrets.ACTION_TOKEN }} | |
tag: ${{ github.event.inputs.TAG }} | |
build-macos-app: | |
name: Release MacOS | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: stable | |
- name: Set up xcode | |
uses: devbotsxyz/xcode-select@v1 | |
- name: Build macos | |
env: | |
MACOS_APP_RELEASE_PATH: build/macos/Build/Products/Release | |
run: | | |
cp -f pubspec.yaml assets/ | |
flutter config --enable-macos-desktop | |
flutter pub get | |
flutter build macos --release --tree-shake-icons | |
brew install create-dmg | |
cd $MACOS_APP_RELEASE_PATH | |
create-dmg \ | |
--volname "MikanProject Installer" \ | |
--window-pos 200 120 \ | |
--window-size 800 529 \ | |
--icon-size 130 \ | |
--text-size 14 \ | |
--icon "mikan.app" 260 250 \ | |
--hide-extension "mikan.app" \ | |
--app-drop-link 540 250 \ | |
--hdiutil-quiet \ | |
"MikanProject.dmg" \ | |
"mikan.app" | |
cd ../../../../../ | |
mv $MACOS_APP_RELEASE_PATH/MikanProject.dmg macos-release.dmg | |
- name: Release Mac | |
uses: ncipollo/release-action@v1 | |
with: | |
allowUpdates: true | |
artifacts: "macos-release.dmg" | |
token: ${{ secrets.ACTION_TOKEN }} | |
tag: ${{ github.event.inputs.TAG }} | |
- name: Build iOS | |
run: | | |
cp -f pubspec.yaml assets/ | |
flutter pub get | |
flutter build ios --release --tree-shake-icons --no-codesign | |
mkdir -p Payload | |
mv build/ios/iphoneos/Runner.app Payload | |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" | |
brew install zip | |
zip -r ios-release.ipa Payload | |
- name: Release iOS | |
uses: ncipollo/release-action@v1 | |
with: | |
allowUpdates: true | |
artifacts: "ios-release.ipa" | |
token: ${{ secrets.ACTION_TOKEN }} | |
tag: ${{ github.event.inputs.TAG }} |