Allow publishing of dartdoc_test #23
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 to pub.dev | |
on: | |
push: | |
tags: | |
- '*-v[0-9]+.[0-9]+.[0-9]+*' | |
jobs: | |
find-package: | |
runs-on: ubuntu-latest | |
steps: | |
- id: sed | |
run: | | |
PACKAGE=$(echo "$GITHUB_REF" | sed 's#refs/tags/\([^-]*\)-.*#\1#') | |
echo "package=$PACKAGE">> "$GITHUB_OUTPUT" | |
echo "Prepare to publish \`$PACKAGE\`" >> "$GITHUB_STEP_SUMMARY" | |
outputs: | |
package: ${{steps.sed.outputs.package}} | |
pana: | |
runs-on: ubuntu-latest | |
needs: find-package | |
steps: | |
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab | |
- uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46 | |
- run: dart pub global activate pana | |
- run: dart pub global run pana . >> "$GITHUB_STEP_SUMMARY" | |
working-directory: ${{needs.find-package.outputs.package}} | |
publish: | |
needs: | |
- find-package | |
- pana | |
uses: dart-lang/setup-dart/.github/workflows/publish.yml@v1 | |
with: | |
environment: pub.dev | |
working-directory: ${{needs.find-package.outputs.package}} |