Release #109
Workflow file for this run
This file contains hidden or 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: | |
| - "*" | |
| permissions: | |
| contents: write | |
| env: | |
| FLUTTER_VERSION: 3.32.1 | |
| 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-common-release.apk ciyue-universal-release.apk | |
| mv app-armeabi-v7a-common-release.apk ciyue-armeabi-v7a-release.apk | |
| mv app-arm64-v8a-common-release.apk ciyue-arm64-v8a-release.apk | |
| mv app-x86_64-common-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 libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-plugins-good gstreamer1.0-plugins-bad | |
| 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 .tar.xz | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Linux | |
| path: ciyue-linux.tar.xz | |
| - name: Install AppImage-Builder | |
| run: | | |
| wget -O appimage-builder-x86_64.AppImage https://github.com/AppImageCrafters/appimage-builder/releases/download/v1.1.0/appimage-builder-1.1.0-x86_64.AppImage | |
| chmod +x appimage-builder-x86_64.AppImage | |
| sudo apt install -y binutils coreutils desktop-file-utils fakeroot fuse libgdk-pixbuf2.0-dev patchelf python3-pip python3-setuptools squashfs-tools strace util-linux zsync | |
| - name: Build AppImage | |
| run: ./appimage-builder-x86_64.AppImage | |
| - name: Upload AppImage | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Linux-AppImage | |
| path: Ciyue-latest-x86_64.AppImage* | |
| 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,Linux-AppImage/Ciyue-latest-x86_64.AppImage*" | |
| tag: ${{ github.ref_name }} |