-
Notifications
You must be signed in to change notification settings - Fork 5
76 lines (64 loc) · 2.19 KB
/
release.yaml
File metadata and controls
76 lines (64 loc) · 2.19 KB
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
---
name: PyPI release
# yamllint disable-line rule:truthy
on:
push:
# Only invoked on release tag pushes
tags:
- v*.*.*
env:
python-version: 3.11
jobs:
build:
runs-on: ubuntu-latest
permissions:
# IMPORTANT: mandatory for Sigstore
id-token: write
steps:
### BUILDING ###
- name: Checkout repository
# yamllint disable-line rule:line-length
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Configure Python
# yamllint disable-line rule:line-length
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
with:
python-version: ${{ env.python-version }}
- name: Build package distribution files
run: >-
pipx run tox -e clean,build
### SIGNING ###
- name: Sign pacakges with Sigstore
# yamllint disable-line rule:line-length
uses: sigstore/gh-action-sigstore-python@a5caf349bc536fbef3668a10ed7f5cd309a4b53d # v3.2.0
with:
inputs: >-
./dist/*.tar.gz
./dist/*.whl
- name: Store the distribution packages
# yamllint disable-line rule:line-length
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: ${{ github.ref_name }}
path: dist/
publish:
runs-on: ubuntu-latest
permissions:
# IMPORTANT: mandatory for Sigstore and for PyPI publishing
id-token: write
steps:
### BUILDING ###
- name: Checkout repository
# yamllint disable-line rule:line-length
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Configure Python
# yamllint disable-line rule:line-length
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
with:
python-version: ${{ env.python-version }}
- name: Build package distribution files
run: >-
pipx run tox -e clean,build
- name: Publish to PyPI
# yamllint disable-line rule:line-length
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0