-
Notifications
You must be signed in to change notification settings - Fork 5
46 lines (37 loc) · 995 Bytes
/
publish.yml
File metadata and controls
46 lines (37 loc) · 995 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
39
40
41
42
43
44
45
46
name: Build and Publish to PyPI
on:
push:
tags:
- 'v*'
release:
types: [published]
workflow_dispatch:
jobs:
build_and_publish:
name: Build and publish to PyPI
runs-on: ubuntu-latest
if: github.event_name == 'release' || startsWith(github.ref, 'refs/tags/v')
environment:
name: pypi
url: https://pypi.org/p/qpro
permissions:
id-token: write # For trusted publishing
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install uv
uses: astral-sh/setup-uv@v3
- name: Install build dependencies
run: uv pip install --system build
- name: Build source distribution only
run: python -m build --sdist
- name: List built packages
run: ls -la dist/
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
verbose: true
skip-existing: true