Skip to content

Commit d3b5615

Browse files
committed
fixed upload
1 parent 6a61af6 commit d3b5615

File tree

1 file changed

+9
-21
lines changed

1 file changed

+9
-21
lines changed

.github/workflows/publish-github.yaml

Lines changed: 9 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -7,42 +7,30 @@ on:
77
description: 'Release tag to pull wheels from'
88
required: true
99

10-
# Grant the runner permission to read repo contents and write to Packages
1110
permissions:
1211
contents: read
1312
packages: write
1413

1514
jobs:
1615
publish:
1716
runs-on: ubuntu-latest
18-
environment:
19-
name: production
20-
2117
steps:
22-
- name: Checkout repository
23-
uses: actions/checkout@v3
24-
25-
- name: Set up Python 3.12
26-
uses: actions/setup-python@v4
27-
with:
28-
python-version: '3.12'
29-
30-
- name: Download wheels from release ${{ github.event.inputs.tag }}
18+
- uses: actions/checkout@v3
19+
- uses: actions/setup-python@v4
20+
with: { python-version: '3.12' }
21+
- name: Download wheels
3122
uses: robinraju/[email protected]
3223
with:
3324
repository: ${{ github.repository }}
3425
tag: ${{ github.event.inputs.tag }}
3526
fileName: '*.whl'
3627
out-file-path: 'dist'
37-
38-
- name: List downloaded wheels
39-
run: ls dist
40-
41-
- name: Publish wheels to GitHub Packages
28+
- name: Publish to GitHub Packages
29+
env:
30+
TWINE_USERNAME: __token__
31+
TWINE_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
4232
run: |
4333
python -m pip install --upgrade pip twine
4434
python -m twine upload \
45-
--repository-url https://upload.pypi.pkg.github.com/${{ github.repository_owner }} \
46-
--username __token__ \
47-
--password ${{ secrets.GITHUB_TOKEN }} \
35+
--repository-url https://api.github.com/orgs/${{ github.repository_owner }}/packages/pypi/upload \
4836
dist/*

0 commit comments

Comments
 (0)