v0.1.1 #6
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish Python Package | |
on: | |
release: | |
types: [published] | |
permissions: | |
contents: read | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
- name: Install Hatch | |
run: pipx install hatch | |
- name: Build package | |
run: hatch build | |
- name: Upload Package | |
uses: actions/upload-artifact@v4 | |
with: | |
name: dist | |
path: dist/* | |
deploy: | |
runs-on: ubuntu-latest | |
needs: build | |
permissions: | |
id-token: write | |
steps: | |
- name: Create dist | |
run: mkdir dist | |
- name: Download Package | |
uses: actions/download-artifact@v4 | |
with: | |
name: dist | |
path: dist/ | |
- name: Publish to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 |