chore: update readme badges (#5) #24
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: Publish | |
env: | |
dart_version: 2.19.2 | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
publish: | |
permissions: | |
id-token: write # required for authentication using OIDC to publish to pub.dev | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dart-lang/setup-dart@v1 | |
with: | |
sdk: ${{ env.dart_version }} | |
- name: Pub Get | |
run: dart pub get | |
- name: Run Tests | |
run: | | |
dart test --coverage=coverage | |
dart run coverage:format_coverage --lcov --in=coverage --out=coverage/lcov.info --report-on=lib | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
- name: Publish to pub.dev | |
run: dart pub publish --force | |
- name: Create tag | |
run: | | |
version=v$(dart run tool/get_version.dart) | |
git tag $version | |
git push origin $version |