Skip to content

Commit

Permalink
Added Github workflow to deploy to Pypi when published on Github
Browse files Browse the repository at this point in the history
  • Loading branch information
cauethenorio committed Oct 11, 2023
1 parent 8eb2d99 commit 7dcc6b9
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 to PyPI

on:
release:
types: [published]

permissions:
contents: read

jobs:
deploy:
runs-on: ubuntu-latest

environment: release
permissions:
id-token: write

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: Test package
run: hatch run test

- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit 7dcc6b9

Please sign in to comment.