Skip to content

Commit

Permalink
Add publish workflow (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbrochart authored Jul 18, 2024
1 parent 552df49 commit 9061056
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Publish
on:
push:
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: 3.12

- run: |
pip install hatch
hatch build
- uses: actions/upload-artifact@v4
with:
path: ./dist

pypi-publish:
needs: ['build']
environment: 'publish'

name: Upload release to PyPI
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4

- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_TOKEN }}
packages_dir: artifact/

0 comments on commit 9061056

Please sign in to comment.