Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: Release
on:
workflow_dispatch:
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- name: checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: install uv
uses: astral-sh/setup-uv@v6
with:
python-version: "3.10"
enable-cache: true
- name: dependencies
run: uv sync --locked --dev
- name: release
run: uv run semantic-release publish
env:
GH_TOKEN: ${{ github.token }}
28 changes: 0 additions & 28 deletions .github/workflows/upload.yml

This file was deleted.

8 changes: 8 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ set quiet
help:
just --list

# bump version and release (dry-run on test PyPI)
bump-test:
uv run semantic-release publish --upload-to-index testpypi --no-commit --no-push

# bump version and release (prod)
bump:
uv run semantic-release publish

# build package
build:
uv build
Expand Down
21 changes: 20 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,14 @@ homepage = "https://github.com/manchenkoff/openapi3-parser"
source = "https://github.com/manchenkoff/openapi3-parser"

[dependency-groups]
dev = ["mypy>=2.1.0", "pytest>=9.0.3", "pytest-cov>=6.1.0", "ruff>=0.15.13", "ty>=0.0.37"]
dev = [
"mypy>=2.1.0",
"pytest>=9.0.3",
"pytest-cov>=6.1.0",
"python-semantic-release>=10.5.3",
"ruff>=0.15.13",
"ty>=0.0.37",
]

[build-system]
requires = ["uv_build>=0.11.12,<0.12"]
Expand All @@ -41,6 +48,18 @@ build-backend = "uv_build"
[tool.uv.build-backend]
module-name = "openapi_parser"

[tool.semantic_release]
version_toml = ["pyproject.toml:project.version"]
branch = "main"
build_command = """
uv lock --upgrade-package "$PACKAGE_NAME"
git add uv.lock
uv build
"""
upload_to_pypi = true
upload_to_release = true
remove_dist = true

[[tool.uv.index]]
name = "testpypi"
url = "https://test.pypi.org/simple/"
Expand Down
Loading
Loading