Skip to content

release v0.1.0 (#8) #22

release v0.1.0 (#8)

release v0.1.0 (#8) #22

Workflow file for this run

name: build
on:
push:
tags:
- v*
branches:
- main
pull_request:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
defaults:
run:
shell: bash
jobs:
build:
name: Build artifacts
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version-file: pyproject.toml
- name: Install UV
uses: astral-sh/setup-uv@v6
- name: Build wheel and source distribution
run: uv build
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: artifacts
path: dist/*
if-no-files-found: error
publish:
name: Publish to PyPI
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
needs: build
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- name: Download Python artifacts
uses: actions/download-artifact@v4
with:
name: artifacts
path: dist
- name: Push Python artifacts to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
skip-existing: true