Skip to content

Commit

Permalink
Update release workflow to include Hatch for publishing to PyPI
Browse files Browse the repository at this point in the history
  • Loading branch information
mikita-sakalouski committed Sep 17, 2024
1 parent 9928994 commit 0725c5d
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,22 @@ jobs:
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
runs-on: ubuntu-latest
# Specifying a GitHub environment is optional, but strongly encouraged
environment: release
environment:
name: release
url: https://pypi.org/project/koheesio/
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write

steps:
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
- name: Download Python artifacts
uses: actions/download-artifact@v4
with:
name: python-artifacts
path: dist

- name: Install Hatch
uses: pypa/hatch@install

- name: Publish package to PyPI
run: hatch publish --yes --no-prompt

0 comments on commit 0725c5d

Please sign in to comment.