Skip to content

fix: add Postgres-backed rate limiter for multi-worker deployments (#… #42

fix: add Postgres-backed rate limiter for multi-worker deployments (#…

fix: add Postgres-backed rate limiter for multi-worker deployments (#… #42

Workflow file for this run

name: release
on:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
jobs:
test:
if: "!contains(github.event.head_commit.message, '[skip ci]')"
uses: ./.github/workflows/test.yml
release:
if: "!contains(github.event.head_commit.message, '[skip ci]')"
runs-on: ubuntu-latest
needs: test
outputs:
released: ${{ steps.release.outputs.released }}
tag: ${{ steps.release.outputs.tag }}
permissions:
contents: write
steps:
- name: Generate token for version incrementer app
id: create_token
uses: tibdex/github-app-token@v2
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.PRIVATE_KEY }}
- name: Setup | Checkout Repository on Release Branch
uses: actions/checkout@v4
with:
ref: ${{ github.ref_name }}
fetch-depth: 0
token: ${{ steps.create_token.outputs.token }}
- name: Sync to latest remote
run: |
git fetch --prune origin
git checkout ${{ github.ref_name }}
git merge --ff-only origin/${{ github.ref_name }}
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version-file: "pyproject.toml"
- name: Install dependencies
run: uv sync
- name: Action | Semantic Version Release
id: release
uses: python-semantic-release/python-semantic-release@v10.4.1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
git_committer_name: "github-actions"
git_committer_email: "actions@users.noreply.github.com"
commit: "false"
push: "false"
tag: "false"
changelog: "true"
vcs_release: "false"
- name: Commit and push version changes
if: steps.release.outputs.released == 'true'
run: |
git config user.name "github-actions"
git config user.email "actions@users.noreply.github.com"
uv lock
git add pyproject.toml CHANGELOG.md uv.lock
git commit -m "chore: release ${{ steps.release.outputs.tag }} [skip ci]
Automatically generated by python-semantic-release"
git tag ${{ steps.release.outputs.tag }}
git push origin ${{ github.ref_name }} --tags
- name: Create GitHub Release
if: steps.release.outputs.released == 'true'
run: |
gh release create ${{ steps.release.outputs.tag }} \
--title "${{ steps.release.outputs.tag }}" \
--generate-notes
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}