-
Notifications
You must be signed in to change notification settings - Fork 6
42 lines (34 loc) · 997 Bytes
/
cd.yml
File metadata and controls
42 lines (34 loc) · 997 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
name: CD
on:
workflow_dispatch:
release:
types:
- published
env:
# Many color libraries just need this to be set to any value, but at least
# one distinguishes color depth, where "3" -> "256-bit color".
FORCE_COLOR: 3
jobs:
pypi-publish:
name: Build & publish to PyPI
runs-on: ubuntu-latest
environment:
name: release
url: https://pypi.org/p/docstub
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
persist-credentials: false
- uses: actions/setup-python@v6
with:
python-version: "3.13"
- name: Build wheel & sdist
run: |
git clean -fxd
pip install -U build twine wheel
python -m build --sdist --wheel
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0