Skip to content

Commit

Permalink
Updating workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
DennisAlund committed Mar 25, 2024
1 parent 2f7df5d commit cda6520
Showing 1 changed file with 6 additions and 40 deletions.
46 changes: 6 additions & 40 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ on:
- "v[0-9]+.[0-9]+.[0-9]+*"

jobs:
validate:
name: Validate
publish:
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@v4

Expand All @@ -17,6 +18,8 @@ jobs:
channel: "stable"
cache: true

- uses: dart-lang/setup-dart@v1

- run: flutter --version

- run: flutter pub get
Expand All @@ -25,24 +28,9 @@ jobs:

- run: flutter analyze --verbose

test:
name: Test
runs-on: ubuntu-latest
needs: validate
steps:
- uses: actions/checkout@v4

- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: "stable"
cache: true

- run: flutter pub get

- name: Run tests
run: flutter test --coverage --test-randomize-ordering-seed=$RANDOM

- name: Generate coverage report
run: genhtml coverage/lcov.info -o coverage/html

Expand All @@ -51,27 +39,5 @@ jobs:
name: coverate-report
path: coverage/html


publish:
name: Publish Plugin
runs-on: ubuntu-latest
permissions:
id-token: write
needs: test
steps:
- uses: actions/checkout@v4

- uses: dart-lang/setup-dart@v1

- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: "stable"
cache: true

- run: flutter --version

- run: flutter pub get

- name: Publish package
run: flutter pub publish --force

0 comments on commit cda6520

Please sign in to comment.