name: release-please
on:
push:
branches: [main]
permissions:
contents: read
jobs:
release-please:
runs-on: ubuntu-latest
timeout-minutes: 30
outputs:
release_created: ${{ steps.release-please.outputs.release_created }}
tag_name: ${{ steps.release-please.outputs.tag_name }}
permissions:
contents: write
pull-requests: write
issues: write
steps:
- uses: google-github-actions/release-please-action@db8f2c60ee802b3748b512940dde88eabd7b7e01 # v3.7.13
id: release-please
with:
release-type: python
package-name: falcon-mcp
pull-request-header: ':rocket: New Release Incoming! :rocket:'
changelog-types: '[{"type":"feat","section":"Features","hidden":false},{"type":"fix","section":"Bug Fixes","hidden":false},{"type":"refactor","section":"Refactoring","hidden":false},{"type":"chore","section":"Miscellaneous","hidden":true}]'
- name: Checkout PR branch
if: ${{ steps.release-please.outputs.pr }}
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
with:
ref: ${{ fromJSON(steps.release-please.outputs.pr).headBranchName }}
- name: Sync gemini-extension.json version
if: ${{ steps.release-please.outputs.pr }}
run: |
# Extract version from pyproject.toml (already updated by release-please)
VERSION=$(grep -Po '(?<=^version = ")[^"]*' pyproject.toml)
CURRENT=$(jq -r '.version' gemini-extension.json)
if [ "$VERSION" != "$CURRENT" ]; then
jq --arg v "$VERSION" '.version = $v' gemini-extension.json > tmp.json && mv tmp.json gemini-extension.json
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add gemini-extension.json
git commit -m "chore: sync gemini-extension.json version to $VERSION"
git push
fi
pypi-publish:
needs: release-please
if: ${{ needs.release-please.outputs.release_created == 'true' }}
permissions:
id-token: write
contents: read
uses: ./.github/workflows/pypi-publish.yml
with:
tag_name: ${{ needs.release-please.outputs.tag_name }}
docker-release:
needs: release-please
if: ${{ needs.release-please.outputs.release_created == 'true' }}
permissions:
contents: read
packages: write
uses: ./.github/workflows/docker-build-push.yml
with:
tag_name: ${{ needs.release-please.outputs.tag_name }}
secrets: inherit