This repository was archived by the owner on Mar 16, 2026. It is now read-only.
feat: release version 1.7.0 with new critic and messaging features #1
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
| # When you push a version tag (e.g. v1.6.0), create a GitHub Release. | |
| # That triggers: | |
| # - .github/workflows/pypi-publish.yml (publish to PyPI) | |
| # - .github/workflows/docs.yml (open a PR with versioned docs; no push to main, so no diverging branch) | |
| # | |
| # Usage: | |
| # git tag v1.6.0 | |
| # git push origin v1.6.0 | |
| # | |
| # If main has already diverged (e.g. from an older workflow): git fetch origin && git checkout main && git pull --rebase origin main | |
| name: Release on tag | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Get version from tag | |
| id: version | |
| run: | | |
| V="${GITHUB_REF#refs/tags/v}" | |
| echo "version=$V" >> $GITHUB_OUTPUT | |
| echo "Tag: v$V" | |
| - name: Extract changelog section | |
| run: | | |
| V="${{ steps.version.outputs.version }}" | |
| # Match "## [1.6.0]" or "## [1.6.0] - TBD" and print until next ## | |
| awk -v ver="$V" ' | |
| $0 ~ "^## \\[" ver "\\]" { found=1; next } | |
| found && /^## \[/ { exit } | |
| found { print } | |
| ' CHANGELOG.md > release_notes.md | |
| [ -s release_notes.md ] || echo "See CHANGELOG.md for details." > release_notes.md | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| name: v${{ steps.version.outputs.version }} | |
| body_path: release_notes.md | |
| draft: false | |
| generate_release_notes: true | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |