Publishing #12
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: Publishing | |
on: | |
release: | |
types: | |
- published | |
workflow_dispatch: | |
jobs: | |
pypi-publish: | |
name: PyPI | |
if: github.repository_owner == 'juftin' && (github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && github.actor == 'juftin')) | |
runs-on: ubuntu-latest | |
environment: | |
name: pypi | |
url: https://pypi.org/p/llm-term | |
permissions: | |
id-token: write | |
steps: | |
- name: Check out the repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
- name: Install Hatch | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install -q hatch pre-commit | |
hatch --version | |
- name: Build package | |
run: | | |
hatch build | |
- name: Publish package on PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 |