Skip to content

Commit

Permalink
ci: 增加PyPI发布流水线
Browse files Browse the repository at this point in the history
  • Loading branch information
Guo-Zhang committed May 27, 2023
1 parent 3601cae commit a878e54
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflow/pypi-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: pypi-publish
on:
# https://docs.github.com/cn/actions/using-workflows/events-that-trigger-workflows#release
release:
types: [published]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: set up Python3.9
uses: actions/setup-python@v1
with:
python-version: 3.9
- name: install pypa/build
run: >-
python -m pip install build --user
- name: build
run: >-
python -m build --sdist --wheel --outdir dist/ .
- name: publish
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}

0 comments on commit a878e54

Please sign in to comment.