GitHub Action for automatically bump FastAPI Best Architecture plugin version after a release.
When a plugin repository pushes a new tag, this Action automatically creates a pull request to update the corresponding submodule in fastapi-practices/plugins.
Add the following workflow file to your plugin repository (e.g. .github/workflows/release.yml):
name: Plugin Releaseon:
push:
tags:
- "v*"jobs:
update-submodule:
runs-on: ubuntu-lateststeps:
- name: Update plugin submoduleuses: fastapi-practices/plugin-release@v1with:
push-to: your-username/pluginsenv:
GH_TOKEN: ${{ secrets.GH_TOKEN }}| Input | Required | Default | Description |
|---|---|---|---|
push-to | Yes | — | The repository to push the update branch to (owner/repo), e.g. your-username/plugins |
plugin-name | No | Repository name of the caller | Plugin name, must match the submodule directory name in fastapi-practices/plugins |
| Variable | Required | Description |
|---|---|---|
GH_TOKEN | Yes | GitHub personal access token with write access to the push-to repository, see creating a PAT |
- Validates that the version in
plugin.tomlmatches the pushed tag - Checks out the push-to repository with all submodules
- Syncs with the upstream
fastapi-practices/pluginsrepository - Validates that the specified plugin submodule exists
- Creates a new branch in the push-to repository
- Updates the submodule to the latest commit via
git submodule update --remote - Commits and pushes the changes
- Opens a pull request against the upstream plugins repository
If the submodule is already up to date, no PR is created.