Skip to content

Commit

Permalink
feat: add release workflow
Browse files Browse the repository at this point in the history
Co-authored-by: Ghaith Kdimati <[email protected]>"
  • Loading branch information
Ofahmy143 committed Oct 1, 2024
1 parent 223ec46 commit 16a9d29
Show file tree
Hide file tree
Showing 2 changed files with 92 additions and 2 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Semantic Release

on:
push:
branches:
- release

jobs:
release:
runs-on: ubuntu-latest
concurrency: release
permissions:
id-token: write
contents: write
pull-requests: write
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11

- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
export PATH="$HOME/.local/bin:$PATH"
- name: Install dependencies
run: |
poetry install
- name: Python Semantic Release
uses: python-semantic-release/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
push: true
directory: ./
53 changes: 51 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tool.poetry]
name = "fastapi-rls"
name = "rls"
version = "0.0.1"
description = "fastapi sqlalchemy rls integration package"
authors = [
Expand Down Expand Up @@ -38,8 +38,57 @@ pytest-xdist = "^3.6.1"
requests = "^2.32.3"
alembic = "^1.13.3"




[tool.semantic_release]
branch= "release"
assets = []
commit_message = "{version}\n\nNew Release"
commit_parser = "angular"
logging_use_named_masks = true
tag_format = "v{version}"
commit_version_number = true

version_variable = [
"src/tryceratops/__init__.py:__version__"
]
version_toml = [
"pyproject.toml:tool.poetry.version",
"pyproject.toml:project.version"
]
version_pattern = [
"README.md:rev: v{version}",
"docs/CONTRIBUTING.md:rls, version {version}"
]
major_on_zero = false
upload_to_PyPI = true
upload_to_release = true
build_command = "pip install poetry && poetry build"


[tool.semantic_release.branches.release-action]
match = "release"


[tool.semantic_release.commit_parser_options]
allowed_tags = ["build", "chore", "ci", "docs", "feat", "fix", "perf", "style", "refactor", "test"]
minor_tags = ["feat"]
patch_tags = ["fix", "perf"]

[tool.semantic_release.remote]
name = "origin"
type = "github"
ignore_token_for_push = false

# [tool.semantic_release.publish]
# dist_glob_patterns = ["dist/*"]
# upload_to_vcs_release = true



[project]
name = "fastapi-rls"
name = "rls"
version = "0.0.1"
authors = [
{ name = "DelfinaCare", email = "[email protected]" }
Expand Down

0 comments on commit 16a9d29

Please sign in to comment.