Skip to content

Commit

Permalink
Automate publishing to PyPI
Browse files Browse the repository at this point in the history
  • Loading branch information
anze3db committed Aug 12, 2023
1 parent 53d37d9 commit 81602e1
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Publish to PyPI

on:
release:
types: [published]

permissions:
contents: read

jobs:
deploy:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install hatch
- name: Build package
run: hatch build
- name: Publish package
env:
HATCH_INDEX_AUTH: ${{ secrets.HATCH_INDEX_AUTH }}
HATCH_INDEX_USER: ${{ secrets.HATCH_INDEX_USER }}
run: hatch publish

0 comments on commit 81602e1

Please sign in to comment.