Skip to content

Commit f1dce87

Browse files
committed
Fix publishing workflow and add gh upload step
- a copy-paste "typo" ('testpypi') is fixed - add a step which should do a release asset upload via the gh CLI
1 parent 0f33b3b commit f1dce87

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

.github/workflows/publish_to_pypi.yaml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ jobs:
2727
name: packages
2828
path: dist/*
2929

30-
publish:
30+
publish_pypi:
3131
needs: [build-dists]
3232
runs-on: ubuntu-latest
33-
environment: publish-testpypi
33+
environment: publish
3434
permissions:
3535
id-token: write
3636

@@ -42,3 +42,19 @@ jobs:
4242

4343
- name: Publish to PyPI
4444
uses: pypa/gh-action-pypi-publish@release/v1
45+
46+
publish_release_asset:
47+
needs: [build-dists]
48+
runs-on: ubuntu-latest
49+
50+
steps:
51+
- uses: actions/download-artifact@v3
52+
with:
53+
name: packages
54+
path: dist
55+
56+
- name: Publish to GitHub Release
57+
env:
58+
GH_TOKEN: ${{ github.token }}
59+
GH_REPO: ${{ github.repository }}
60+
run: gh release upload "${{ github.release }}" dist/*.tgz

0 commit comments

Comments
 (0)