-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: add workflow for auto publish, format test workflow
Signed-off-by: Harry Chen <[email protected]>
- Loading branch information
1 parent
e4bc337
commit e4b46fb
Showing
2 changed files
with
44 additions
and
32 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
name: Publish to pub.dev | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v[0-9]+.[0-9]+.[0-9]+*' | ||
|
||
jobs: | ||
publish: | ||
permissions: | ||
id-token: write | ||
uses: dart-lang/setup-dart/.github/workflows/publish.yml@v1 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,38 @@ | ||
name: Test | ||
|
||
on: | ||
push: | ||
pull_request: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
if: "!contains(github.event.head_commit.message, 'ci skip')" | ||
strategy: | ||
matrix: | ||
sdk: [stable, beta] | ||
test: | ||
runs-on: ubuntu-latest | ||
if: '!contains(github.event.head_commit.message, "ci skip")' | ||
strategy: | ||
matrix: | ||
sdk: [stable, beta] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dart-lang/setup-dart@v1 | ||
with: | ||
sdk: ${{ matrix.sdk }} | ||
- run: dart pub get | ||
- run: dart format --output=none --set-exit-if-changed . | ||
- run: dart analyze | ||
- run: dart test | ||
- run: dart doc | ||
- name: Upload generated dartdoc | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: docs-${{ matrix.sdk }} | ||
path: doc/ | ||
- name: Evaluate score with pana | ||
run: | | ||
dart pub global activate pana | ||
dart pub global run pana . | ||
# - name: Run example code | ||
# run: | | ||
# cd example | ||
# dart pub get | ||
# dart run lib/main.dart | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dart-lang/setup-dart@v1 | ||
with: | ||
sdk: ${{ matrix.sdk }} | ||
- run: dart pub get | ||
- run: dart format --output=none --set-exit-if-changed . | ||
- run: dart analyze | ||
- run: dart test | ||
- run: dart doc | ||
- name: Upload generated dartdoc | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: docs-${{ matrix.sdk }} | ||
path: doc/ | ||
- name: Evaluate score with pana | ||
run: | | ||
dart pub global activate pana | ||
dart pub global run pana . | ||
# - name: Run example code | ||
# run: | | ||
# cd example | ||
# dart pub get | ||
# dart run lib/main.dart |