Skip to content

Commit a462903

Browse files
committed
Publish to PyPI from a version tag (Trusted Publishing); package summary says noncommercial use
1 parent 93b1549 commit a462903

2 files changed

Lines changed: 28 additions & 1 deletion

File tree

‎.github/workflows/publish.yml‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Publish to PyPI
2+
3+
# A tag v<version> (the same as `version` in pyproject.toml) builds the package and publishes it to PyPI
4+
# through Trusted Publishing: no token, PyPI trusts this workflow in the `pypi` environment.
5+
6+
on:
7+
push:
8+
tags: ["v*"]
9+
10+
jobs:
11+
publish:
12+
runs-on: ubuntu-latest
13+
environment: pypi
14+
permissions:
15+
id-token: write
16+
steps:
17+
- uses: actions/checkout@v4
18+
- uses: astral-sh/setup-uv@v6
19+
with:
20+
python-version: "3.12"
21+
- name: Tag matches the package version
22+
run: |
23+
version=$(grep -m1 '^version = ' pyproject.toml | cut -d'"' -f2)
24+
test "v$version" = "$GITHUB_REF_NAME" || { echo "tag $GITHUB_REF_NAME, pyproject $version"; exit 1; }
25+
- name: Build
26+
run: uv build
27+
- uses: pypa/gh-action-pypi-publish@release/v1

‎pyproject.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[project]
22
name = "booksy-api-mcp"
33
version = "1.0.1"
4-
description = "Self-hosted Skool API and MCP server on your own Chrome session. Personal use only."
4+
description = "Self-hosted Skool API and MCP server on your own Chrome session. Noncommercial use (PolyForm Noncommercial 1.0.0)."
55
readme = "README.md"
66
license = "PolyForm-Noncommercial-1.0.0"
77
license-files = ["LICENSE"]

0 commit comments

Comments
 (0)