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
18 changes: 13 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,23 @@ jobs:
outputs:
release_created: ${{ steps.release.outputs.release_created }}
steps:
# Versioning lives in release-please-config.json and
# .release-please-manifest.json; passing release-type here would make
# the action ignore both and fall back to 0.1.0 (no v1.0.0 tag exists).
- uses: googleapis/release-please-action@v4
id: release
with:
release-type: python
package-name: apinator-server

publish:
needs: release-please
if: needs.release-please.outputs.release_created
runs-on: ubuntu-latest
# Trusted publishing: PyPI exchanges this job's GitHub OIDC token for a
# short-lived upload credential, so no PyPI token secret is stored.
# Configured on pypi.org (project -> Publishing) for owner apinator-io,
# repo sdk-python, workflow release.yml, environment pypi.
environment: pypi
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
Expand All @@ -35,8 +40,11 @@ jobs:
with:
python-version: "3.12"

- name: Install build tools
run: pip install build
- name: Install build and test tools
run: pip install build pytest

- name: Test
run: pytest tests/ -q

- name: Build package
run: python -m build
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ build/
.pytest_cache/
.mypy_cache/
.DS_Store
.coverage
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "1.0.0"
}
2 changes: 1 addition & 1 deletion apinator/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from .webhook import verify_webhook
from .errors import RealtimeError, AuthenticationError, ValidationError, ApiError

__version__ = "1.0.0"
__version__ = "1.0.0" # x-release-please-version
__all__ = [
"Apinator",
"authenticate_channel",
Expand Down
6 changes: 6 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ classifiers = [
"Programming Language :: Python :: 3.12",
]

[project.urls]
Homepage = "https://apinator.io"
Documentation = "https://apinator.io/documentation/#sdk-python"
Source = "https://github.com/apinator-io/sdk-python"
Changelog = "https://github.com/apinator-io/sdk-python/blob/main/CHANGELOG.md"

[project.optional-dependencies]
dev = ["pytest>=7.0", "pytest-cov>=4.0"]

Expand Down
12 changes: 12 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
"bootstrap-sha": "97e43871f7c985870d24ab5dfb71b8b5043ab031",
"include-component-in-tag": false,
"packages": {
".": {
"release-type": "python",
"package-name": "apinator-server",
"extra-files": ["apinator/__init__.py"]
}
}
}
Loading