Skip to content

Commit e44f420

Browse files
Create publish-release.yml
1 parent 34f6b01 commit e44f420

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Publish release to PyPI
2+
on:
3+
release:
4+
types: [created]
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Set release name as environment variable
11+
run: echo "RELEASE_NAME=${{ github.event.release.tag_name }}" >> $GITHUB_ENV
12+
- uses: actions/checkout@v3
13+
- name: Set up Python
14+
uses: actions/setup-python@v4
15+
with:
16+
python-version: "3.10"
17+
- name: Install dependencies
18+
run: |
19+
python -m pip install --upgrade pip
20+
pip install build
21+
pip install wheel
22+
- name: Build a binary wheel and a source tarball
23+
run: |
24+
python setup.py sdist bdist_wheel
25+
- name: Publish distribution to PyPI
26+
uses: pypa/gh-action-pypi-publish@release/v1
27+
with:
28+
password: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)