-
-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add workflow to publish releases to PyPI
Signed-off-by: Xiaochao Dong (@damnever) <the.xcdong@gmail.com>
- Loading branch information
Showing
1 changed file
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Release | ||
on: | ||
push: | ||
tags: [v**] | ||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
name: Build and Publish Python distributions to PyPI | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.11 | ||
architecture: x64 | ||
- name: Install requirements | ||
run: pip install build | ||
- name: Build distributions | ||
run: python -m build | ||
- name: Publish distribution to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
verbose: true | ||
print_hash: true | ||
packages_dir: dist | ||
user: __token__ | ||
password: ${{ secrets.PYPI_API_TOKEN }} |