update http to latest version 1.2.1 #74
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
name: Flutter CI | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
name: Test casdoor-flutter-sdk on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v2 | |
with: | |
distribution: "adopt" | |
java-version: "12.x" | |
- uses: subosito/flutter-action@v1 | |
with: | |
flutter-version: "3.10.6" | |
- name: Install dependencies | |
run: flutter packages get | |
- name: Analyze | |
run: flutter analyze | |
- name: Format | |
run: dart format --set-exit-if-changed . | |
- name: Run tests | |
run: flutter test --coverage | |
- name: Upload coverage to Codecov | |
if: startsWith(matrix.os, 'macos') | |
uses: codecov/[email protected] | |
# release on Github and pub.dev | |
publish: | |
needs: test | |
if: github.repository == 'casdoor/casdoor-flutter-sdk' && github.event_name == 'push' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: dart-lang/setup-dart@v1 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: 18 | |
- run: npm install -g "@semantic-release/changelog" | |
- run: npm install -g "@semantic-release/git" | |
- run: npm install -g "pub-semantic-release" | |
- name: Semantic Release | |
run: | | |
export NODE_PATH="$(npm root -g)" | |
npx semantic-release@17 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
build: | |
needs: [test,publish] | |
if: github.repository == 'casdoor/casdoor-flutter-sdk' && github.event_name == 'push' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Publish Dart/Flutter package | |
uses: k-paxian/dart-package-publisher@master | |
with: | |
flutter: true | |
skipTests: true | |
dryRunOnly: true | |
credentialJson: ${{ secrets.CREDENTIAL_JSON }} | |
deploy: | |
needs: [test,publish,build] | |
if: github.repository == 'casdoor/casdoor-flutter-sdk' && github.event_name == 'push' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Publish Dart/Flutter package | |
uses: k-paxian/dart-package-publisher@master | |
with: | |
flutter: true | |
skipTests: true | |
credentialJson: ${{ secrets.CREDENTIAL_JSON }} | |