-
Notifications
You must be signed in to change notification settings - Fork 1
33 lines (30 loc) · 859 Bytes
/
Copy pathrelease.yml
File metadata and controls
33 lines (30 loc) · 859 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
name: Release
# Publishes to PyPI on a version tag (e.g. v0.1.0) using PyPI Trusted Publishing
# (OIDC): no API tokens stored. Configure the publisher on PyPI first:
# https://docs.pypi.org/trusted-publishers/
on:
push:
tags: ["v*"]
jobs:
build-and-publish:
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write # required for trusted publishing
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Test
run: |
python -m pip install -e ".[dev]"
ruff check .
mypy src
pytest -q
- name: Build
run: |
python -m pip install --upgrade pip build
python -m build
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1