Bump to v0.1.2 (#66) #2
Workflow file for this run
This file contains hidden or 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
# Adapted from: https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/ | |
name: Publish to PyPI | |
on: | |
push: | |
tags: | |
# Publish when a tag is pushed | |
- '*' | |
jobs: | |
build: | |
name: Build distribution | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
- name: Install hatch | |
run: | | |
python -m pip install --upgrade pip | |
pip install hatch | |
- name: Build distribution | |
run: hatch build -c | |
- name: Store packages | |
uses: actions/upload-artifact@v4 | |
with: | |
name: python-package-distributions | |
path: dist/ | |
publish-to-pypi: | |
name: Publish to PyPI | |
runs-on: ubuntu-latest | |
needs: | |
- build | |
environment: | |
name: pypi | |
url: https://pypi.org/p/eerepr | |
permissions: | |
id-token: write # IMPORTANT: mandatory for trusted publishing | |
steps: | |
- name: Download dists | |
uses: actions/download-artifact@v4 | |
with: | |
name: python-package-distributions | |
path: dist/ | |
- name: Publish distribution to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 |