Skip to content

Commit cd07c5a

Browse files
committed
Restore environment configuration for PyPI publishing
1 parent 98099bb commit cd07c5a

4 files changed

Lines changed: 58 additions & 3 deletions

File tree

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,9 @@ jobs:
205205
publish-pypi:
206206
runs-on: ubuntu-latest
207207
needs: [validate-version, create-release]
208-
# environment:
209-
# name: pypi
210-
# url: https://pypi.org/p/fastapi-jwt-harmony
208+
environment:
209+
name: pypi
210+
url: https://pypi.org/p/fastapi-jwt-harmony
211211
permissions:
212212
id-token: write # For trusted publishing
213213

MANUAL_PYPI_PUBLISH.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Manual PyPI Publishing
2+
3+
## Current Situation
4+
5+
The automated PyPI publishing via GitHub Actions is failing due to trusted publisher configuration mismatch. The error shows:
6+
7+
```
8+
* `invalid-publisher`: valid token, but no corresponding publisher (Publisher with matching claims was not found)
9+
```
10+
11+
## Manual Publishing Steps
12+
13+
1. **Create PyPI API Token** (if you don't have one):
14+
- Go to https://pypi.org/manage/account/token/
15+
- Create a token with scope "Entire account" or for specific project
16+
17+
2. **Set up `.pypirc` file** (optional):
18+
```bash
19+
# Create ~/.pypirc with:
20+
[pypi]
21+
username = __token__
22+
password = <your-token-here>
23+
```
24+
25+
3. **Upload the packages**:
26+
```bash
27+
# Using uv (recommended)
28+
uv run --group build twine upload fastapi_jwt_harmony-0.1.1*
29+
30+
# Or using pip
31+
pip install twine
32+
twine upload fastapi_jwt_harmony-0.1.1*
33+
```
34+
35+
4. **After successful manual upload**, configure trusted publisher:
36+
- Go to https://pypi.org/manage/project/fastapi-jwt-harmony/settings/publishing/
37+
- Add a new publisher with these EXACT settings:
38+
- **Owner**: `ivolnistov`
39+
- **Repository name**: `fastapi-jwt-harmony`
40+
- **Workflow name**: `release.yml`
41+
- **Environment name**: `pypi` (optional but recommended)
42+
43+
## Verification
44+
45+
After manual upload, verify the package:
46+
```bash
47+
pip install fastapi-jwt-harmony==0.1.1
48+
```
49+
50+
## Files Ready for Upload
51+
52+
- `fastapi_jwt_harmony-0.1.1-py3-none-any.whl` (23 KB)
53+
- `fastapi_jwt_harmony-0.1.1.tar.gz` (45 KB)
54+
55+
Both files have been built and tested on all platforms successfully.
22.6 KB
Binary file not shown.

fastapi_jwt_harmony-0.1.1.tar.gz

45.1 KB
Binary file not shown.

0 commit comments

Comments
 (0)