Skip to content

Commit d4c1027

Browse files
committed
Disable automatic PyPI publishing, keep manual control
- Remove automatic PyPI publishing from release workflow - Build PyPI packages and upload as artifacts instead - Keep manual publishing workflow: python -m twine upload dist/* - Maintains release security and control over PyPI deployments - Docker publishing remains automated for convenience
1 parent b0b8e6c commit d4c1027

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

.github/workflows/release.yml

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,9 @@ on:
66
workflow_dispatch: # Allow manual triggering
77

88
jobs:
9-
pypi-publish:
10-
name: Publish to PyPI
9+
pypi-build:
10+
name: Build PyPI packages (manual publish)
1111
runs-on: ubuntu-latest
12-
environment: release
13-
permissions:
14-
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
1512

1613
steps:
1714
- uses: actions/checkout@v5
@@ -25,9 +22,9 @@ jobs:
2522
uses: actions/cache@v4
2623
with:
2724
path: ~/.cache/pip
28-
key: ubuntu-latest-pip-release-${{ hashFiles('requirements.txt', 'pyproject.toml') }}
25+
key: ubuntu-latest-x64-pip-release-${{ hashFiles('requirements.txt', 'pyproject.toml') }}
2926
restore-keys: |
30-
ubuntu-latest-pip-release-
27+
ubuntu-latest-x64-pip-release-
3128
ubuntu-latest-pip-
3229
3330
- name: Install build dependencies
@@ -43,10 +40,15 @@ jobs:
4340
run: |
4441
python -m twine check dist/*
4542
46-
- name: Publish to PyPI
47-
uses: pypa/gh-action-pypi-publish@release/v1
48-
# Only publish on actual releases, not manual workflow dispatch
49-
if: github.event_name == 'release'
43+
- name: Upload PyPI artifacts for manual publishing
44+
uses: actions/upload-artifact@v4
45+
with:
46+
name: pypi-packages
47+
path: dist/*
48+
retention-days: 30
49+
50+
# PyPI publishing disabled - do this manually:
51+
# python -m twine upload dist/*
5052

5153
docker-publish:
5254
name: Publish Docker image

0 commit comments

Comments
 (0)