New extension api #403
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
# This is a basic workflow to help you get started with Actions | |
name: Dev Build CI | |
on: | |
pull_request: | |
branches: ["main", "dev"] | |
push: | |
branches: ["dev"] | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "build" | |
build-and-release-android: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v3 | |
- name: Flutter action | |
uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: 3.16.8 | |
channel: stable | |
- name: Decode keystore | |
run: | | |
echo $ENCODED_KEYSTORE | base64 -di > android/app/keystore.jks | |
env: | |
ENCODED_KEYSTORE: ${{ secrets.KEYSTORE }} | |
- run: flutter pub get | |
# 打包apk | |
- name: Collect Apks | |
run: flutter build apk --release --split-per-abi | |
env: | |
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }} | |
KEY_ALIAS: ${{ secrets.KEY_ALIAS }} | |
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD}} | |
# 发布安装包 | |
- name: Upload Artifact - armeabi-v7a | |
uses: actions/upload-artifact@v3 | |
with: | |
path: "build/app/outputs/flutter-apk/app-armeabi-v7a-release.apk" | |
name: Miru-pr-${{ github.event.pull_request.number }}-armeabi-v7a.apk | |
- name: Upload Artifact - arm64-v8a | |
uses: actions/upload-artifact@v3 | |
with: | |
path: "build/app/outputs/flutter-apk/app-arm64-v8a-release.apk" | |
name: Miru-pr-${{ github.event.pull_request.number }}-arm64-v8a.apk | |
- name: Upload Artifact - x86 | |
uses: actions/upload-artifact@v3 | |
with: | |
path: "build/app/outputs/flutter-apk/app-x86_64-release.apk" | |
name: Miru-pr-${{ github.event.pull_request.number }}-x86_64.apk | |
build-and-release-windows: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: subosito/[email protected] | |
with: | |
flutter-version: 3.16.8 | |
channel: stable | |
- name: Install project dependencies | |
run: flutter pub get | |
- name: Build artifacts | |
run: flutter build windows --release | |
- name: Rename Release Directory Name to Miru-App # 为了解压缩后更好看一点 | |
run: | | |
mv build/windows/x64/runner/Release build/windows/x64/runner/Miru-App | |
# 发布安装包 | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
path: "build/windows/x64/runner/Miru-App" | |
name: Miru-pr-${{ github.event.pull_request.number }}-windows.zip | |
build-and-release-linux: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install Dependencies | |
run: sudo apt-get install ninja-build build-essential libgtk-3-dev libmpv-dev mpv | |
- uses: actions/checkout@v3 | |
- uses: subosito/[email protected] | |
with: | |
flutter-version: 3.16.8 | |
channel: stable | |
- name: Install project dependencies | |
run: flutter pub get | |
- name: Build artifacts | |
run: flutter build linux --release | |
- name: Rename Release Directory Name to Miru-App # 为了解压缩后更好看一点 | |
run: | | |
mv build/linux/x64/release/bundle build/linux/x64/release/Miru-App | |
# 发布安装包 | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
path: "build/linux/x64/release/Miru-App" | |
name: Miru-pr-${{ github.event.pull_request.number }}-linux.zip |