Publish plugin #51
Workflow file for this run
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 plugin | ||
on: | ||
release: | ||
types: [published] | ||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
id-token: write # Required for authentication using OIDC | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
# Note: This workflow uses the latest stable version of the Dart SDK. | ||
# You can specify other versions if desired, see documentation here: | ||
# https://github.com/dart-lang/setup-dart/blob/main/README.md | ||
- uses: dart-lang/setup-dart@v1.4 | ||
# - uses: dart-lang/setup-dart@9a04e6d73cca37bd455e0608d7e5092f881fd603 | ||
- name: Install dependencies | ||
run: dart pub get | ||
- name: Run build_runner | ||
run: dart run build_runner build | ||
- name: Analyze project source | ||
run: dart analyze --fatal-infos | ||
- name: Run tests | ||
run: dart test --coverage="coverage" | ||
- name: Install coverage tools | ||
run: dart pub global activate coverage | ||
- name: Format Coverage | ||
run: dart pub global run coverage:format_coverage --packages=.dart_tool/package_config.json --report-on=lib --lcov -o ./coverage/coverage.lcov -i ./coverage | ||
- name: Setup Pub Credentials | ||
shell: bash | ||
env: | ||
PUB_DEV_PUBLISH_ACCESS_TOKEN: ${{ secrets.PUB_DEV_PUBLISH_ACCESS_TOKEN }} | ||
PUB_DEV_PUBLISH_REFRESH_TOKEN: ${{ secrets.PUB_DEV_PUBLISH_REFRESH_TOKEN }} | ||
PUB_DEV_PUBLISH_TOKEN_ENDPOINT: ${{ secrets.PUB_DEV_PUBLISH_TOKEN_ENDPOINT }} | ||
PUB_DEV_PUBLISH_EXPIRATION: ${{ secrets.PUB_DEV_PUBLISH_EXPIRATION }} | ||
run: | | ||
sh ./pub_login.sh | ||
- name: Check Publish Warnings | ||
run: dart pub publish --dry-run | ||
- name: Upload Coverage to CodeCov | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
token: ${{secrets.CODECOV_TOKEN}} | ||
file: coverage/coverage.lcov | ||
publish: | ||
runs-on: ubuntu-latest | ||
needs: 'test' | ||
permissions: | ||
id-token: write # Required for authentication using OIDC | ||
uses: dart-lang/setup-dart/.github/workflows/publish.yml@v1 | ||
Check failure on line 65 in .github/workflows/publish.yml GitHub Actions / Publish pluginInvalid workflow file
|
||
with: | ||
environment: 'pub.dev' | ||