-
Notifications
You must be signed in to change notification settings - Fork 14
39 lines (31 loc) · 911 Bytes
/
Copy pathpublish.yml
File metadata and controls
39 lines (31 loc) · 911 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
34
35
36
37
38
name: Publish to PyPI via Trusted Publisher
on:
push:
tags:
- v*
jobs:
deploy:
runs-on: ubuntu-latest
environment:
name: pypi # environment name must match what you configure on PyPI
permissions:
id-token: write # required for OIDC trusted publishing
contents: read # minimal other permissions (you may trim more if possible)
steps:
- uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: 3.x
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install build
- name: Build package
run: python -m build
- name: Publish distribution to PyPI
if: startsWith(github.ref, 'refs/tags/')
uses: pypa/gh-action-pypi-publish@release/v1.13
with:
skip-existing: true
verbose: true