96 lines
2.2 KiB
YAML
96 lines
2.2 KiB
YAML
name: Build
|
|
|
|
on:
|
|
push:
|
|
branches: [ "main" ]
|
|
pull_request:
|
|
branches: [ "main" ]
|
|
|
|
jobs:
|
|
build:
|
|
continue-on-error: true
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- platform: android
|
|
os: ubuntu-latest
|
|
targets: aab,apk
|
|
|
|
# - platform: windows
|
|
# os: windows-latest
|
|
# targets: exe
|
|
|
|
# - platform: linux
|
|
# os: ubuntu-latest
|
|
# targets: appimage
|
|
|
|
# - platform: macos
|
|
# os: macos-latest
|
|
# targets: dmg
|
|
|
|
# - platform: ios
|
|
# os: macos-latest
|
|
# targets: ipa
|
|
|
|
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- name: checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Setup Flutter
|
|
uses: subosito/flutter-action@v2
|
|
with:
|
|
flutter-version: '3.10.6'
|
|
channel: 'stable'
|
|
|
|
- name: Setup Go environment
|
|
uses: actions/setup-go@v4.0.1
|
|
|
|
- name: Install GCC
|
|
if: ${{ matrix.os }} == "macos-latest"
|
|
run: brew install gcc
|
|
|
|
- name: Set up MinGW
|
|
if: ${{ matrix.os }} != "macos-latest"
|
|
uses: egor-tensin/setup-mingw@v2
|
|
with:
|
|
platform: x64
|
|
|
|
- name: Setup Java
|
|
if: ${{ matrix.platform }} == "android"
|
|
uses: actions/setup-java@v3
|
|
with:
|
|
distribution: "zulu"
|
|
java-version: 11
|
|
|
|
- name: Setup Android SDK
|
|
if: ${{ matrix.platform }} == "android"
|
|
uses: android-actions/setup-android@v2
|
|
|
|
- name: Get Dependencies
|
|
run: |
|
|
make get
|
|
|
|
- name: Generate
|
|
run: |
|
|
make gen
|
|
make translate
|
|
|
|
|
|
- name: Generate Libs ${{ matrix.platform }}
|
|
run: |
|
|
make ${{ matrix.platform }}-libs
|
|
|
|
- name: Release ${{ matrix.platform }}
|
|
run: |
|
|
make ${{ matrix.platform }}-release
|
|
mkdir out
|
|
find ./ -type f -name "$(echo '*.${{ matrix.targets }}'| tr ',' ' ')" -exec cp {} out \;
|
|
|
|
- uses: actions/upload-artifact@v3
|
|
with:
|
|
name: ${{ matrix.platform }}
|
|
path: ./out |