Skip to content

Commit d9d20a7

Browse files
authored
Merge branch 'main' into string
2 parents 709317c + edc0f6d commit d9d20a7

File tree

4 files changed

+47
-7
lines changed

4 files changed

+47
-7
lines changed

.github/workflows/prepare-release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,4 @@ jobs:
3434
title: Release ${{ inputs.version }}
3535
body: Update the changelog and the specfile for release ${{ inputs.version }}.
3636
delete-branch: true
37+
token: ${{ secrets.RELEASEBOT_GITHUB_TOKEN }}

.github/workflows/pypi-publish.yml

Lines changed: 39 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,58 @@ name: Publish Python 🐍 distributions 📦 to PyPI
55

66
on:
77
release:
8+
# • `released` reacts to stable releases
9+
# • `prereleased` reacts to pre-releases
10+
# • `published` reacts to both
811
types: [published]
912

1013
jobs:
11-
build-n-publish:
14+
build:
15+
name: Build distribution 📦
1216
runs-on: ubuntu-latest
13-
permissions:
14-
id-token: write # for trusted publishing
1517

1618
steps:
17-
- uses: actions/checkout@v3
18-
- uses: actions/setup-python@v4
19+
- uses: actions/checkout@v4
20+
with:
21+
persist-credentials: false
22+
23+
- uses: actions/setup-python@v5
24+
25+
- name: Get history and tags for SCM versioning to work
26+
run: |
27+
git fetch --prune --unshallow
28+
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
1929
2030
- name: Build a source tarball and a binary wheel
2131
# https://pypa-build.readthedocs.io
2232
run: |
2333
python -m pip install build
2434
python -m build
2535
36+
- name: Store the distribution packages
37+
uses: actions/upload-artifact@v4
38+
with:
39+
name: python-package-distributions
40+
path: dist/
41+
42+
publish:
43+
name: Publish Python 🐍 distribution 📦 to PyPI
44+
needs:
45+
- build
46+
runs-on: ubuntu-latest
47+
environment:
48+
name: pypi
49+
url: https://pypi.org/project/specfile/
50+
permissions:
51+
id-token: write # for trusted publishing
52+
53+
steps:
54+
- name: Download all the dists
55+
uses: actions/download-artifact@v4
56+
with:
57+
name: python-package-distributions
58+
path: dist/
59+
2660
- name: Publish 📦 to PyPI
2761
# https://github.com/pypa/gh-action-pypi-publish
2862
uses: pypa/gh-action-pypi-publish@release/v1

.pre-commit-config.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,10 @@ repos:
5050
- id: mypy
5151
args: [--show-error-codes, --ignore-missing-imports]
5252
additional_dependencies:
53-
[types-setuptools, types-requests, types-python-dateutil]
53+
- types-setuptools
54+
- types-requests
55+
- types-python-dateutil
56+
- typing_extensions
5457
# This file is overridden by a type stub
5558
exclude: "specfile/context_management.py"
5659
- repo: https://github.com/teemtee/tmt.git

specfile/context_management.pyi

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33

44
import contextlib
55
from collections.abc import Iterator
6-
from typing import Callable, Generator, ParamSpec, TypeVar
6+
from typing import Callable, Generator, TypeVar
7+
8+
from typing_extensions import ParamSpec
79

810
_T_co = TypeVar("_T_co", covariant=True)
911
_P = ParamSpec("_P")

0 commit comments

Comments
 (0)