Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: release

on:
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+"
pull_request:
branches:
- master

permissions:
contents: read

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6

- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.10"

- name: Install build dependencies
run: |
python -m pip install --upgrade pip
python -m pip install build

- name: Build package
run: python -m build --sdist --wheel

- name: Publish to PyPI
if: github.event_name != 'pull_request'
uses: pypa/gh-action-pypi-publish@v1.13.0
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
skip_existing: true
Loading