Bump to 0.0.1a4 #26
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
name: Release | |
on: | |
pull_request: | |
paths-ignore: | |
- docs/** | |
- .github/workflows/*.yaml | |
- '!.github/workflows/release.yaml' | |
push: | |
paths-ignore: | |
- docs/** | |
- .github/workflows/*.yaml | |
- '!.github/workflows/release.yaml' | |
branches: | |
- main | |
tags: ['**'] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
cache: pip | |
- name: install build package | |
run: | | |
pip install --upgrade pip | |
pip install build | |
pip freeze | |
- name: build release | |
run: | | |
python -m build --sdist --wheel . | |
ls -l dist | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: dist-${{ github.sha }} | |
path: dist/* | |
if-no-files-found: error | |
upload-pypi: | |
permissions: | |
id-token: write | |
environment: pypi | |
runs-on: ubuntu-24.04 | |
if: startsWith(github.ref, 'refs/tags/') | |
needs: | |
- build | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
path: dist | |
merge-multiple: true | |
- name: Publish to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 |