Skip to content

Commit

Permalink
Merge pull request #31 from mik3y/mikey/release-action
Browse files Browse the repository at this point in the history
actions: add pypi release action
  • Loading branch information
mik3y authored Aug 26, 2023
2 parents 6601da3 + 3d2940e commit 268a140
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Release to PyPI

on:
push:
tags:
- 'v*'

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Build package
run: |
python -m pip install --upgrade pip wheel
python setup.py sdist bdist_wheel
- name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_PASSWORD }}

0 comments on commit 268a140

Please sign in to comment.