Skip to content

Commit

Permalink
Fix publishing workflow and add gh upload step
Browse files Browse the repository at this point in the history
- a copy-paste "typo" ('testpypi') is fixed
- add a step which should do a release asset upload via the gh CLI
  • Loading branch information
sirosen committed Aug 25, 2023
1 parent 0f33b3b commit f1dce87
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions .github/workflows/publish_to_pypi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ jobs:
name: packages
path: dist/*

publish:
publish_pypi:
needs: [build-dists]
runs-on: ubuntu-latest
environment: publish-testpypi
environment: publish
permissions:
id-token: write

Expand All @@ -42,3 +42,19 @@ jobs:

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

publish_release_asset:
needs: [build-dists]
runs-on: ubuntu-latest

steps:
- uses: actions/download-artifact@v3
with:
name: packages
path: dist

- name: Publish to GitHub Release
env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
run: gh release upload "${{ github.release }}" dist/*.tgz

0 comments on commit f1dce87

Please sign in to comment.