Skip to content

chore(version): release v1.14.0-beta.2 #101

chore(version): release v1.14.0-beta.2

chore(version): release v1.14.0-beta.2 #101

Workflow file for this run

name: Release
on:
push:
tags:
- "*"
permissions:
contents: write
env:
flutter-version: 3.29.3
jobs:
changelogFile:
name: Generate changelog file
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: "main"
- name: Generate a changelog
uses: orhun/git-cliff-action@v3
with:
config: cliff.toml
args: --verbose --tag ${{ github.ref_name }}
env:
OUTPUT: CHANGELOG.md
- name: Commit
run: |
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
set +e
git add CHANGELOG.md
git commit -m "Update changelog"
git push
build-android:
name: Build Android
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.flutter-version }}
cache: true
- uses: actions/setup-java@v4
with:
java-version: 21
distribution: "temurin"
- name: Decode Keystore
run: |
echo "${{ secrets.KEYSTORE_BASE64 }}" | base64 --decode > android/app/keystore.jks
- name: Create key.properties
run: |
echo "${{ secrets.KEY_PROPERTIES }}" > android/key.properties
- name: Install dependencies
run: flutter pub get
- name: Build Android
run: |
flutter build apk
flutter build apk --split-per-abi --target-platform=android-arm64
flutter build apk --split-per-abi --target-platform=android-arm
flutter build apk --split-per-abi --target-platform=android-x64
- name: Rename .apk
run: |
cd build/app/outputs/flutter-apk
mv app-release.apk ciyue-universal-release.apk
mv app-armeabi-v7a-release.apk ciyue-armeabi-v7a-release.apk
mv app-arm64-v8a-release.apk ciyue-arm64-v8a-release.apk
mv app-x86_64-release.apk ciyue-x86_64-release.apk
- uses: actions/upload-artifact@v4
with:
name: APKs
path: build/app/outputs/flutter-apk/ciyue-*-release.apk
build-windows:
name: Build Windows
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.flutter-version }}
cache: true
- name: Install dependencies
run: flutter pub get
- name: Build Windows
run: flutter build windows
- name: Copy DLLs
run: |
Copy-Item "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Redist\MSVC\14.42.34433\x64\Microsoft.VC143.CRT\vcruntime140.dll" build/windows/x64/runner/Release/
Copy-Item "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Redist\MSVC\14.42.34433\x64\Microsoft.VC143.CRT\vcruntime140_1.dll" build/windows/x64/runner/Release/
Copy-Item "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Redist\MSVC\14.42.34433\x64\Microsoft.VC143.CRT\msvcp140.dll" build/windows/x64/runner/Release/
- name: Install Inno Setup
run: choco install innosetup -y
- name: Build Installer
run: |
& "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" ciyue.iss
- name: Upload Installer
uses: actions/upload-artifact@v4
with:
name: Windows-Installer
path: ciyue-installer.exe
- name: Compression
run: Compress-Archive -Path build/windows/x64/runner/Release/* -DestinationPath ciyue-windows.zip
- name: Upload
uses: actions/upload-artifact@v4
with:
name: Windows
path: ciyue-windows.zip
build-linux:
name: Build Linux
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.flutter-version }}
cache: true
- name: Install dependencies
run: |
sudo apt update -y
sudo apt install -y libgtk-3-dev
flutter pub get
- name: Build Linux
run: flutter build linux
- name: Compression
run: tar -cJvf ciyue-linux.tar.xz build/linux/x64/release/bundle/*
- name: Upload
uses: actions/upload-artifact@v4
with:
name: Linux
path: ciyue-linux.tar.xz
release:
name: Release
runs-on: ubuntu-latest
needs: [build-android, build-windows, build-linux]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download artifacts
uses: actions/download-artifact@v4
- uses: ncipollo/release-action@v1
with:
artifacts: "APKs/ciyue-*-release.apk,Windows/ciyue-windows.zip,Windows-Installer/ciyue-installer.exe,Linux/ciyue-linux.tar.xz"
tag: ${{ github.ref_name }}