Skip to content

Commit fe61061

Browse files
authored
Merge pull request #346 from jchanvfx/github_release_action
implemented PyPI publish workflow. #265
2 parents bdfc3b5 + c161614 commit fe61061

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

.github/workflows/pypi_publish.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Workflow for publishing module package to https://pypi.org.
2+
name: PyPI Package Publish
3+
4+
on:
5+
# trigger this workflow when a release is published.
6+
release:
7+
types: [published]
8+
9+
jobs:
10+
publish:
11+
runs-on: ubuntu-latest
12+
steps:
13+
# Checks-out your repository under $GITHUB_WORKSPACE , so your workflow can access it.
14+
- name: Checkout
15+
uses: actions/checkout@v3
16+
with:
17+
fetch-depth: 0
18+
# Run build to a specified version of python into a specified directory.
19+
- name: Python Build
20+
run: python3 -m pip install --upgrade build && python3 -m build
21+
# Publish the python package to pypi.org with the api token.
22+
- name: Publish Package
23+
uses: pypa/gh-action-pypi-publish@release/v1
24+
with:
25+
user: __token__
26+
password: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)