Publish Python packages on pypi on every git tag (#761)
* Publish Python wheels on pypi on every git tag * Remove config required for testing * Pin workflow version & remove duplicate dependency
This commit is contained in:
committed by
Alex Crichton
parent
e674eee609
commit
ad7d48479e
19
.github/workflows/main.yml
vendored
19
.github/workflows/main.yml
vendored
@@ -493,6 +493,24 @@ jobs:
|
|||||||
name: tarballs
|
name: tarballs
|
||||||
path: dist
|
path: dist
|
||||||
|
|
||||||
|
# The action 'pypa/gh-action-pypi-publish' will try to upload all files in the
|
||||||
|
# dist/ folder. This folder also contains non-package files, and therefore the
|
||||||
|
# action fails.
|
||||||
|
#
|
||||||
|
# To prevent the action from failing all .whl files are copied into a new
|
||||||
|
# directory.
|
||||||
|
- run: |
|
||||||
|
mkdir -p tmp/whl
|
||||||
|
find dist/ -name '*.whl' -type f -exec cp '{}' tmp/whl -v \;
|
||||||
|
|
||||||
|
- name: Publish Python wheels on Pypi
|
||||||
|
uses: pypa/gh-action-pypi-publish@v1.0.0a0
|
||||||
|
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
|
||||||
|
with:
|
||||||
|
user: __token__
|
||||||
|
password: ${{ secrets.pypi_password }}
|
||||||
|
packages_dir: tmp/whl
|
||||||
|
|
||||||
# ... and if this was an actual push (tag or `master`) then we publish a
|
# ... and if this was an actual push (tag or `master`) then we publish a
|
||||||
# new release. This'll automatically publish a tag release or update `dev`
|
# new release. This'll automatically publish a tag release or update `dev`
|
||||||
# with this `sha`
|
# with this `sha`
|
||||||
@@ -503,3 +521,4 @@ jobs:
|
|||||||
files: "dist/*"
|
files: "dist/*"
|
||||||
name: ${{ steps.tagname.outputs.val }}
|
name: ${{ steps.tagname.outputs.val }}
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user