Skip to content

update ci

update ci #22

Workflow file for this run

name: Genshin CI
on:
push:
pull_request: { branches: [master] }
jobs:
build-Android:
runs-on: ubuntu-latest
steps:
- uses: nelonoel/[email protected]
- uses: benjlevesque/[email protected]
id: short-sha
with: { length: 7 }
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with: { channel: stable, cache: true }
- name: 🏗️ Build Apk (arm64,android-x64)
run: flutter build apk --split-per-abi --target-platform android-arm64,android-x64,android-arm --release
- name: Sign APK
uses: r0adkll/sign-android-release@v1
with:
releaseDirectory: build/app/outputs/flutter-apk
signingKeyBase64: ${{ secrets.APK_SIGN_JKS_BASE64 }}
alias: ${{ secrets.APK_SIGN_ALIAS }}
keyStorePassword: ${{ secrets.APK_SIGN_PASS }}
env:
BUILD_TOOLS_VERSION: "30.0.3"
- name: Rename APK
run: |
cd build/app/outputs/flutter-apk/
mv app-armeabi-v7a-release-signed.apk genshin-wish-${{ env.BRANCH_NAME }}-${{ env.SHA }}-armeabi-v7a-release-signed.apk
mv app-arm64-v8a-release-signed.apk genshin-wish-${{ env.BRANCH_NAME }}-${{ env.SHA }}-arm64-v8a-release-signed.apk
mv app-x86_64-release-signed.apk genshin-wish-${{ env.BRANCH_NAME }}-${{ env.SHA }}-x86_64-release-signed.apk
- name: Upload armeabi-v7a apk artifact File
uses: actions/upload-artifact@v3
with:
name: genshin-wish-${{ env.BRANCH_NAME }}-${{ env.SHA }}-app-armeabi-v7a-release-signed.apk
path: build/app/outputs/flutter-apk/genshin-wish-${{ env.BRANCH_NAME }}-${{ env.SHA }}-armeabi-v7a-release-signed.apk
- name: Upload arm64-v8a apk artifact File
uses: actions/upload-artifact@v3
with:
name: genshin-wish-${{ env.BRANCH_NAME }}-${{ env.SHA }}-app-arm64-v8a-release-signed.apk
path: build/app/outputs/flutter-apk/genshin-wish-${{ env.BRANCH_NAME }}-${{ env.SHA }}-arm64-v8a-release-signed.apk
- name: Upload x86_64 apk artifact File
uses: actions/upload-artifact@v3
with:
name: genshin-wish-${{ env.BRANCH_NAME }}-${{ env.SHA }}-app-x86_64-release-signed.apk
path: build/app/outputs/flutter-apk/genshin-wish-${{ env.BRANCH_NAME }}-${{ env.SHA }}-x86_64-release-signed.apk
build-Windows:
runs-on: windows-latest
steps:
- uses: nelonoel/[email protected]
- uses: benjlevesque/[email protected]
id: short-sha
with: { length: 7 }
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with: { channel: stable, cache: true }
- run: |
flutter pub get
flutter build windows --release
- name: Upload Windows build file
uses: actions/upload-artifact@v3
with:
name: ${{ env.BRANCH_NAME }}-${{ env.SHA }}-windows-x86_64.zip
path: build/windows/runner/Release
build-Linux:
runs-on: ubuntu-latest
steps:
- uses: nelonoel/[email protected]
- uses: benjlevesque/[email protected]
id: short-sha
with: { length: 7 }
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with: { channel: stable, cache: true }
- run: |
sudo apt-get update -y
sudo apt-get install -y clang cmake ninja-build pkg-config libgtk-3-dev webkit2gtk-4.0
flutter pub get
flutter build linux --release
- name: Upload linux build File
uses: actions/upload-artifact@v3
with:
name: ${{ env.BRANCH_NAME }}-${{ env.SHA }}-linux-x86_64.zip
path: build/linux/x64/release/bundle
build-iOS:
runs-on: macos-11
steps:
- uses: actions/checkout@v3
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- uses: subosito/flutter-action@v2
with: { channel: stable, cache: true }
- name: 🏗️ Build iOS
run: flutter build ios --no-codesign
build-MacOS:
runs-on: macos-latest
steps:
- uses: nelonoel/[email protected]
- uses: benjlevesque/[email protected]
id: short-sha
with: { length: 7 }
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with: { channel: stable, cache: true }
# Building
- name: Build macOS
run: |
flutter pub get
flutter build macos --release
- name: Upload web File
uses: actions/upload-artifact@v3
with:
name: ${{ env.BRANCH_NAME }}-${{ env.SHA }}-macos.zip
path: build/macos/Build/Products/Release