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@0c366fd6a839edf440554fa01a7085ccba70ac98 # v5.0.1
19
20 - name: Set up Python
21 uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
22
23 - name: Install build dependencies
24 run: python -m pip install uv
25
26 - name: Build distributions
27 run: python -m uv build
28
29 - name: Upload distributions
30 uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
31 with:
32 name: pyopenssl-dists
33 path: dist/
34
35 pypi:
36 name: Publish to PyPI
37 runs-on: ubuntu-latest
38 needs:
39 - build
40
41 permissions:
42 # Used to authenticate to PyPI via OIDC.
43 id-token: write
44
45 steps:
46 - name: fetch dists
47 uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
48 with:
49 name: pyopenssl-dists
50 path: dist/
51
52 - name: publish
53 if: github.event_name == 'push'
54 uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0
55 with:
56 attestations: true