Skip to content

Commit

Permalink
Create publish-release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
TKIPisalegacycipher committed Aug 5, 2023
1 parent 34f6b01 commit e44f420
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Publish release to PyPI
on:
release:
types: [created]

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Set release name as environment variable
run: echo "RELEASE_NAME=${{ github.event.release.tag_name }}" >> $GITHUB_ENV
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
pip install wheel
- name: Build a binary wheel and a source tarball
run: |
python setup.py sdist bdist_wheel
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}

0 comments on commit e44f420

Please sign in to comment.