v0.20.1.0 feat: /pair-review smart batching — coverage hints + post-P… #47
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: Auto-tag and release on VERSION change | |
| on: | |
| push: | |
| branches: [main] | |
| paths: [VERSION] | |
| permissions: | |
| contents: write | |
| jobs: | |
| tag: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Read version and create tag | |
| id: tag | |
| run: | | |
| VERSION=$(cat VERSION | tr -d '[:space:]') | |
| if ! echo "$VERSION" | grep -qE '^[0-9]+\.[0-9]+\.[0-9]+(\.[0-9]+)?$'; then | |
| echo "Invalid VERSION format: '$VERSION'" | |
| exit 1 | |
| fi | |
| TAG="v${VERSION}" | |
| echo "version=$VERSION" >> "$GITHUB_OUTPUT" | |
| echo "tag=$TAG" >> "$GITHUB_OUTPUT" | |
| if git rev-parse "$TAG" >/dev/null 2>&1; then | |
| echo "Tag $TAG already exists — skipping tag creation." | |
| echo "tag_created=false" >> "$GITHUB_OUTPUT" | |
| exit 0 | |
| fi | |
| echo "Creating tag $TAG" | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git tag -a "$TAG" -m "Release ${VERSION}" | |
| git push origin "$TAG" | |
| echo "tag_created=true" >> "$GITHUB_OUTPUT" | |
| echo "Tagged $TAG successfully." | |
| - name: Create GitHub release | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| TAG: ${{ steps.tag.outputs.tag }} | |
| VERSION: ${{ steps.tag.outputs.version }} | |
| run: | | |
| if gh release view "$TAG" >/dev/null 2>&1; then | |
| echo "Release $TAG already exists — skipping." | |
| exit 0 | |
| fi | |
| NOTES_FILE=$(mktemp) | |
| if ./scripts/extract-changelog-section.sh "$VERSION" > "$NOTES_FILE" 2>/dev/null; then | |
| echo "Using CHANGELOG.md section for release notes." | |
| gh release create "$TAG" --title "$TAG" --notes-file "$NOTES_FILE" | |
| else | |
| echo "::warning::No CHANGELOG section for $VERSION — falling back to auto-generated notes." | |
| gh release create "$TAG" --title "$TAG" --generate-notes | |
| fi |