Debian Codegraph @

.github/workflows/release.yml

raw
1 on:
2 workflow_dispatch:
3 push:
4 tags:
5 - "*.*.*"
6
7 name: release
8
9 permissions:
10 contents: read
11
12 jobs:
13 build:
14 name: Build distributions for PyPI
15 runs-on: ubuntu-latest
16
17 steps:
18 - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
19 with:
20 persist-credentials: false
21
22 - name: Set up Python
23 uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
24
25 - name: Install build dependencies
26 run: python -m pip install uv
27
28 - name: Build distributions
29 run: python -m uv build
30
31 - name: Upload distributions
32 uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
33 with:
34 name: pyopenssl-dists
35 path: dist/
36
37 pypi:
38 name: Publish to PyPI
39 runs-on: ubuntu-latest
40 needs:
41 - build
42
43 permissions:
44 # Used to authenticate to PyPI via OIDC.
45 id-token: write
46
47 steps:
48 - name: fetch dists
49 uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
50 with:
51 name: pyopenssl-dists
52 path: dist/
53
54 - name: publish
55 if: github.event_name == 'push'
56 uses: pypa/gh-action-pypi-publish@ba38be9e461d3875417946c167d0b5f3d385a247 # v1.14.1
57 with:
58 attestations: true