github action

This commit is contained in:
v7lin 2022-03-29 11:03:05 +08:00
parent c03c286333
commit dea2af9918
3 changed files with 16 additions and 18 deletions

View File

@ -1,10 +1,10 @@
name: Build test
name: build
on: [push, pull_request]
jobs:
test_iOS:
name: Test iOS on ${{ matrix.os }}
build_ios:
name: Build iOS on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
@ -20,12 +20,13 @@ jobs:
- run: dart --version
- run: flutter --version
- run: flutter pub get
- run: flutter format --dry-run --set-exit-if-changed .
- run: flutter pub publish --dry-run
- run: flutter analyze lib example/lib
- run: cd example; flutter build ios --no-codesign
test_android:
name: Test android on ${{ matrix.os }}
build_android:
name: Build Android on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
@ -41,6 +42,7 @@ jobs:
- run: dart --version
- run: flutter --version
- run: flutter pub get
- run: flutter format --dry-run --set-exit-if-changed .
- run: flutter pub publish --dry-run
- run: flutter analyze lib example/lib
- run: sudo echo "y" | sudo $ANDROID_HOME/tools/bin/sdkmanager "ndk;20.0.5594570"

View File

@ -1,4 +1,4 @@
name: Publish on release
name: publish
on:
release:
@ -6,14 +6,11 @@ on:
jobs:
publish:
name: Publish
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Publish
uses: sakebook/actions-flutter-pub-publisher@v1.3.0
- uses: actions/checkout@v1
- uses: sakebook/actions-flutter-pub-publisher@v1.3.0
with:
credential: ${{ secrets.CREDENTIAL_JSON }}
flutter_package: true

View File

@ -1,15 +1,14 @@
name: Pub Publish manually
name: publish manually
on: workflow_dispatch
jobs:
publish:
publish_manually:
name: Publish Manually
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Publish
uses: sakebook/actions-flutter-pub-publisher@v1.3.0
- uses: actions/checkout@v1
- uses: sakebook/actions-flutter-pub-publisher@v1.3.0
with:
credential: ${{ secrets.CREDENTIAL_JSON }}
flutter_package: true