Skip to content

chore: fix publishing from GH actions 2 (#6) #25

chore: fix publishing from GH actions 2 (#6)

chore: fix publishing from GH actions 2 (#6) #25

Workflow file for this run

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: Create tag
run: |
version=v$(dart run tool/get_version.dart)
git tag $version
git push origin $version