|
1 | 1 | # Publishing GraphStack to PyPI |
2 | 2 |
|
| 3 | +## Package name |
| 4 | + |
| 5 | +PyPI distribution: **`MertCapkin_GraphStack`** (the name `graphstack` is taken on PyPI). |
| 6 | + |
| 7 | +- `pip install MertCapkin_GraphStack[graphify]` |
| 8 | +- CLI command after install: **`graphstack`** (unchanged) |
| 9 | + |
| 10 | +Pending publisher on PyPI must use project name **`MertCapkin_GraphStack`** — must match `pyproject.toml` `name`. |
| 11 | + |
3 | 12 | ## One-time setup (maintainer) |
4 | 13 |
|
5 | | -1. Create a [PyPI](https://pypi.org) account and project **`graphstack`** (check name availability first). |
6 | | -2. Enable [Trusted Publishing](https://docs.pypi.org/trusted-publishers/) on PyPI: |
7 | | - - GitHub repo: `MertCapkin/GraphStack` |
| 14 | +1. PyPI account → **Publishing** → pending publisher: |
| 15 | + - Pending project name: `MertCapkin_GraphStack` |
| 16 | + - Owner: `MertCapkin` |
| 17 | + - Repository name: `GraphStack` |
8 | 18 | - Workflow: `publish.yml` |
9 | | - - Environment name: `pypi` |
10 | | -3. In GitHub → Settings → Environments → **pypi** → add protection rules if desired. |
| 19 | + - Environment: `pypi` |
| 20 | +2. GitHub → Settings → Environments → create **`pypi`** |
| 21 | +3. Trusted Publishing linked to `MertCapkin/GraphStack` |
11 | 22 |
|
12 | 23 | ## Release flow |
13 | 24 |
|
14 | 25 | 1. Bump version in `pyproject.toml` and `scripts/graphstack/__init__.py`. |
15 | | -2. Update `CHANGELOG.md`. |
16 | | -3. Sync bundled assets: |
17 | | - ```bash |
18 | | - python scripts/sync_assets.py |
19 | | - ``` |
20 | | -4. Commit, tag, and push: |
21 | | - ```bash |
22 | | - git tag v4.5.0 |
23 | | - git push origin v4.5.0 |
24 | | - ``` |
25 | | -5. Create a **GitHub Release** from the tag — this triggers `.github/workflows/publish.yml`. |
26 | | - |
27 | | -Or run **Publish to PyPI** workflow manually (`workflow_dispatch`). |
28 | | - |
29 | | -## Local dry-run (no upload) |
30 | | - |
31 | | -```bash |
32 | | -python scripts/sync_assets.py |
33 | | -python -m pip install build |
34 | | -python -m build |
35 | | -python -m pip install dist/graphstack-*.whl |
36 | | -graphstack --version |
37 | | -graphstack init /tmp/test-project -y --install-deps |
38 | | -``` |
| 26 | +2. `python scripts/sync_assets.py` |
| 27 | +3. Commit, tag, push, **Publish GitHub Release** (triggers `publish.yml`). |
39 | 28 |
|
40 | 29 | ## User install (after publish) |
41 | 30 |
|
42 | 31 | ```bash |
43 | | -pip install "graphstack[graphify]" |
| 32 | +pip install "MertCapkin_GraphStack[graphify]" |
44 | 33 | cd /path/to/your-project |
45 | 34 | graphstack init . -y --install-deps |
46 | 35 | ``` |
47 | 36 |
|
48 | | -Workflow markdown files ship **inside the wheel** under `graphstack/assets/` — no git clone required. |
| 37 | +Or one-liner bootstrap (Cursor terminal): |
| 38 | + |
| 39 | +```powershell |
| 40 | +irm https://raw.githubusercontent.com/MertCapkin/GraphStack/main/scripts/bootstrap.ps1 | iex |
| 41 | +``` |
0 commit comments