Skip to content

Publish

Publish #2

Workflow file for this run

name: Publish
on:
release:
types:
- created
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
cache-dependency-path: pyproject.toml
- uses: actions/cache@v3
id: cache
with:
path: ${{ env.pythonLocation }}
key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}-publish
- name: Install build dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: pip install hatch
- name: Build distribution
run: make build
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1.8.10
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository-url: https://test.pypi.org/legacy/