Skip to content

Commit e2540af

Browse files
authored
Generate digital attestations for PyPI (PEP 740) (#135)
1 parent 7543a08 commit e2540af

File tree

4 files changed

+19
-5
lines changed

4 files changed

+19
-5
lines changed

.github/workflows/deploy.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ on:
1111
permissions:
1212
contents: read
1313

14+
env:
15+
FORCE_COLOR: 1
16+
1417
jobs:
1518
# Always build & lint package.
1619
build-package:
@@ -47,6 +50,7 @@ jobs:
4750
- name: Publish to Test PyPI
4851
uses: pypa/gh-action-pypi-publish@release/v1
4952
with:
53+
attestations: true
5054
repository-url: https://test.pypi.org/legacy/
5155

5256
# Publish to PyPI on GitHub Releases.
@@ -71,3 +75,5 @@ jobs:
7175

7276
- name: Publish to PyPI
7377
uses: pypa/gh-action-pypi-publish@release/v1
78+
with:
79+
attestations: true

.github/workflows/main.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: tests
22

33
on: [push, pull_request, workflow_dispatch]
44

5+
permissions:
6+
contents: read
7+
58
env:
69
FORCE_COLOR: 1
710

@@ -13,24 +16,29 @@ jobs:
1316
matrix:
1417
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
1518
os: [windows-latest, macos-latest, ubuntu-latest]
19+
1620
steps:
1721
- uses: actions/checkout@v4
1822
with:
1923
# fetch all branches and tags
2024
# ref actions/checkout#448
2125
fetch-depth: 0
26+
2227
- name: Set up Python ${{ matrix.python-version }}
2328
uses: actions/setup-python@v5
2429
with:
2530
python-version: ${{ matrix.python-version }}
2631
allow-prereleases: true
2732
cache: pip
2833
cache-dependency-path: pyproject.toml
34+
2935
- name: Install tox
3036
run: |
3137
python -m pip install tox
38+
3239
- name: Run tests
3340
run: tox -e py
41+
3442
- name: Upload coverage
3543
uses: codecov/codecov-action@v4
3644
with:

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/astral-sh/ruff-pre-commit
3-
rev: v0.6.7
3+
rev: v0.6.8
44
hooks:
55
- id: ruff
66
args: [--exit-non-zero-on-fix]
@@ -31,12 +31,12 @@ repos:
3131
- id: check-github-workflows
3232

3333
- repo: https://github.com/rhysd/actionlint
34-
rev: v1.7.1
34+
rev: v1.7.2
3535
hooks:
3636
- id: actionlint
3737

3838
- repo: https://github.com/pre-commit/mirrors-mypy
39-
rev: v1.10.1
39+
rev: v1.11.2
4040
hooks:
4141
- id: mypy
4242
args:
@@ -56,7 +56,7 @@ repos:
5656
- id: pyproject-fmt
5757

5858
- repo: https://github.com/abravalheri/validate-pyproject
59-
rev: v0.19
59+
rev: v0.20.2
6060
hooks:
6161
- id: validate-pyproject
6262

cherry_picker/cherry_picker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737

3838
WORKFLOW_STATES = enum.Enum(
39-
"Workflow states",
39+
"WORKFLOW_STATES",
4040
"""
4141
FETCHING_UPSTREAM
4242
FETCHED_UPSTREAM

0 commit comments

Comments
 (0)