Skip to content

Commit

Permalink
Add pypi workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Vodes committed Oct 30, 2023
1 parent acf1b53 commit 142ce4e
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Publish releases when new tag
on:
push:
tags:
- v[0-9]+**

jobs:
package_build:
name: Build and push to PyPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Prep Python
uses: actions/setup-python@v2
with:
python-version: "3.11"

- name: Install build tools
run: |
python -m pip install build setuptools twine wheel --user
continue-on-error: false
- name: Build source and wheel
id: build
run: |
python -m build --outdir dist/
continue-on-error: true
- name: Check the output
run: |
python -m twine check --strict dist/*
continue-on-error: false
- name: Die on failure
if: steps.build.outcome != 'success'
run: exit 1
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.AUTH_TOKEN }}

0 comments on commit 142ce4e

Please sign in to comment.