-
Notifications
You must be signed in to change notification settings - Fork 251
56 lines (43 loc) · 1.25 KB
/
release.yml
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
47
48
49
50
51
52
53
54
55
56
on:
workflow_dispatch:
push:
tags:
- "*.*.*"
name: release
permissions:
contents: read
jobs:
build:
name: Build distributions for PyPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Set up Python
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
- name: Install build dependencies
run: python -m pip install build
- name: Build distributions
run: python -m build
- name: Upload distributions
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
with:
name: certifi-dists
path: dist/
pypi:
name: Publish to PyPI
runs-on: ubuntu-latest
environment: release
needs:
- build
permissions:
# Used to authenticate to PyPI via OIDC.
id-token: write
steps:
- name: fetch dists
uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1
with:
name: certifi-dists
path: dist/
- name: publish
if: github.event_name == 'push'
uses: pypa/gh-action-pypi-publish@2f6f737ca5f74c637829c0f5c3acd0e29ea5e8bf # v1.8.11