chore(release): bump to 0.30.4 #74
Workflow file for this run
This file contains hidden or 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 package to pub.dev | |
| on: | |
| push: | |
| tags: | |
| - "v[0-9]+.[0-9]+.[0-9]+*" | |
| jobs: | |
| # Same build confirmation as PRs (reusable workflow) — one source of truth, no drift. | |
| verify: | |
| uses: ./.github/workflows/build-verify.yml | |
| publish: | |
| name: Publish Plugin | |
| runs-on: ubuntu-latest | |
| needs: [verify] | |
| permissions: | |
| contents: read | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dart-lang/setup-dart@v1 | |
| - name: Set up Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| channel: "stable" | |
| cache: true | |
| - run: flutter --version | |
| - run: flutter pub get | |
| - name: Publish package | |
| run: flutter pub publish --force | |
| release: | |
| name: Create GitHub Release | |
| runs-on: ubuntu-latest | |
| needs: [publish] | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Build release notes from CHANGELOG | |
| env: | |
| TAG_NAME: ${{ github.ref_name }} | |
| run: | | |
| version="${TAG_NAME#v}" | |
| awk -v version="$version" ' | |
| $0 == "## " version { found=1; print; next } | |
| found && /^## / { exit } | |
| found { print } | |
| ' CHANGELOG.md > release_notes.md | |
| if [ ! -s release_notes.md ]; then | |
| echo "Could not find CHANGELOG entry for version ${version}" | |
| exit 1 | |
| fi | |
| - name: Create or update GitHub Release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| TAG_NAME: ${{ github.ref_name }} | |
| run: | | |
| if gh release view "$TAG_NAME" >/dev/null 2>&1; then | |
| gh release edit "$TAG_NAME" \ | |
| --title "$TAG_NAME" \ | |
| --notes-file release_notes.md | |
| else | |
| gh release create "$TAG_NAME" \ | |
| --title "$TAG_NAME" \ | |
| --notes-file release_notes.md \ | |
| --latest | |
| fi |