-
Notifications
You must be signed in to change notification settings - Fork 0
26 lines (24 loc) · 770 Bytes
/
Copy pathrelease.yml
File metadata and controls
26 lines (24 loc) · 770 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
name: Release
# Publishes to PyPI when a version tag (v*) is pushed, using PyPI Trusted
# Publishing (OIDC) — no API token stored in the repo. One-time setup: add this
# repo as a trusted publisher for the project at https://pypi.org/manage/account/publishing/
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: Build
run: |
python -m pip install --upgrade pip build
python -m build
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1