Skip to content

Commit

Permalink
Add pipeline to release sdist on pypi
Browse files Browse the repository at this point in the history
  • Loading branch information
sunqm committed Dec 18, 2023
1 parent a574724 commit afc6480
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Publish

on:
release:
types:
# Note: editing the prerelease then marking as release does not trigger
# this pipeline
# - prereleased
- released
workflow_dispatch:

jobs:
release-pypi-sdist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build sdist
run: |
python3 setup.py sdist
- name: List available sdist
run: |
ls ${{ github.workspace }}/dist
- name: Publish to PyPI
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
#password: ${{ secrets.PYPI_TEST_API_TOKEN }}
#repository_url: https://test.pypi.org/legacy/
password: ${{ secrets.PYPI_API_TOKEN }}
packages-dir: ${{ github.workspace }}/dist
verbose: true

0 comments on commit afc6480

Please sign in to comment.