Skip to content

Commit 6b69727

Browse files
committed
chore: update shared files
Automated update of shared files from the social-core repository, see https://github.com/python-social-auth/.github/blob/main/repo-sync.py
1 parent 19de2ab commit 6b69727

3 files changed

Lines changed: 134 additions & 29 deletions

File tree

.github/workflows/pre-commit.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,21 @@ jobs:
1313
runs-on: ubuntu-latest
1414

1515
steps:
16-
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
16+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
1717
with:
1818
persist-credentials: false
1919

20-
- uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
20+
- uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
2121
with:
2222
path: ~/.cache/prek
2323
key: ${{ runner.os }}-prek-${{ hashFiles('.pre-commit-config.yaml', 'requirements*.txt') }}
2424

2525
- name: Setup Python
26-
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
26+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
2727
with:
2828
python-version: 3.x
2929

30-
- uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v7.2.0
30+
- uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
3131

3232
- run: uvx prek run --all-files
3333
env:

.github/workflows/release.yml

Lines changed: 124 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,59 @@ permissions:
88
contents: read
99

1010
jobs:
11-
release:
11+
build-wheel:
1212
runs-on: ubuntu-latest
13-
permissions:
14-
id-token: write
1513
steps:
16-
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
14+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
1715
with:
1816
persist-credentials: false
19-
- uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v7.2.0
17+
- uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
18+
19+
- name: Build wheel
20+
run: uv build --wheel
2021

21-
- run: uv build
22+
- name: Upload wheel
23+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
24+
with:
25+
name: dist-wheel
26+
path: dist/*.whl
27+
if-no-files-found: error
28+
29+
build-sdist:
30+
runs-on: ubuntu-latest
31+
steps:
32+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
33+
with:
34+
persist-credentials: false
35+
- uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
36+
37+
- name: Build source distribution
38+
run: uv build --sdist
39+
40+
- name: Upload source distribution
41+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
42+
with:
43+
name: dist-sdist
44+
path: dist/*.tar.gz
45+
if-no-files-found: error
46+
47+
lint-dist:
48+
runs-on: ubuntu-latest
49+
needs:
50+
- build-wheel
51+
- build-sdist
52+
steps:
53+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
54+
with:
55+
persist-credentials: false
56+
- uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
57+
58+
- name: Download distributions
59+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
60+
with:
61+
pattern: dist-*
62+
path: dist
63+
merge-multiple: true
2264

2365
- name: Verify wheel install
2466
run: |
@@ -32,19 +74,82 @@ jobs:
3274
source .venv-install-tar/bin/activate
3375
uv pip install dist/*.tar.gz
3476
35-
- uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
36-
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/')
37-
with:
38-
name: dist
39-
path: |
40-
dist/*.tar.gz
41-
dist/*.whl
77+
- name: Check package metadata
78+
run: uvx twine check dist/*
79+
80+
- name: Check distribution contents
81+
run: uvx pydistcheck --inspect dist/*
4282

43-
- run: uvx twine check dist/*
44-
- run: uvx pydistcheck --inspect dist/*
45-
- run: uvx pyroma dist/*.tar.gz
46-
- run: uvx check-wheel-contents dist/*.whl
47-
- run: uvx check-manifest -v
83+
- name: Check source metadata
84+
run: uvx pyroma dist/*.tar.gz
4885

49-
- if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/')
86+
- name: Check wheel contents
87+
run: uvx check-wheel-contents dist/*.whl
88+
89+
- name: Check source manifest
90+
run: uvx check-manifest -v
91+
92+
publish-pypi:
93+
runs-on: ubuntu-latest
94+
needs: lint-dist
95+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
96+
permissions:
97+
id-token: write
98+
steps:
99+
- uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
100+
101+
- name: Download distributions
102+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
103+
with:
104+
pattern: dist-*
105+
path: dist
106+
merge-multiple: true
107+
108+
- name: Publish to PyPI
50109
run: uv publish --trusted-publishing always
110+
111+
publish-github-release:
112+
runs-on: ubuntu-latest
113+
needs: lint-dist
114+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
115+
permissions:
116+
contents: write
117+
steps:
118+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
119+
with:
120+
persist-credentials: false
121+
122+
- name: Download distributions
123+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
124+
with:
125+
pattern: dist-*
126+
path: dist
127+
merge-multiple: true
128+
129+
- name: Extract release notes
130+
env:
131+
TAG_NAME: ${{ github.ref_name }}
132+
run: |
133+
version="${TAG_NAME#v}"
134+
awk -v version="$version" '
135+
index($0, "## [" version "]") == 1 { in_section = 1; next }
136+
in_section && /^## / { exit }
137+
in_section { print }
138+
' CHANGELOG.md > release-notes.md
139+
sed -i '1{/^$/d;}' release-notes.md
140+
if ! grep -q '[^[:space:]]' release-notes.md; then
141+
echo "No CHANGELOG.md section found for ${version}" >&2
142+
exit 1
143+
fi
144+
145+
- name: Update GitHub release notes
146+
env:
147+
GH_TOKEN: ${{ github.token }}
148+
TAG_NAME: ${{ github.ref_name }}
149+
run: gh release edit "$TAG_NAME" --notes-file release-notes.md
150+
151+
- name: Upload GitHub release assets
152+
env:
153+
GH_TOKEN: ${{ github.token }}
154+
TAG_NAME: ${{ github.ref_name }}
155+
run: gh release upload "$TAG_NAME" dist/*.whl dist/*.tar.gz --clobber

.pre-commit-config.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ repos:
1717
- id: pretty-format-json
1818
args: [--no-sort-keys, --autofix, --no-ensure-ascii]
1919
- repo: https://github.com/astral-sh/ruff-pre-commit
20-
rev: v0.14.13
20+
rev: v0.15.12
2121
hooks:
2222
- id: ruff-check
2323
args: [--fix, --exit-non-zero-on-fix]
@@ -32,11 +32,11 @@ repos:
3232
- id: pretty-format-yaml
3333
args: [--autofix, --indent, '2']
3434
- repo: https://github.com/pappasam/toml-sort
35-
rev: v0.24.3
35+
rev: v0.24.4
3636
hooks:
3737
- id: toml-sort-fix
3838
- repo: https://github.com/abravalheri/validate-pyproject
39-
rev: v0.24.1
39+
rev: v0.25
4040
hooks:
4141
- id: validate-pyproject
4242
- repo: https://github.com/executablebooks/mdformat
@@ -46,16 +46,16 @@ repos:
4646
additional_dependencies:
4747
- mdformat-gfm==1.0.0
4848
- repo: https://github.com/codespell-project/codespell
49-
rev: v2.4.1
49+
rev: v2.4.2
5050
hooks:
5151
- id: codespell
5252
additional_dependencies:
5353
- tomli
5454
- repo: https://github.com/rhysd/actionlint
55-
rev: v1.7.10
55+
rev: v1.7.12
5656
hooks:
5757
- id: actionlint
5858
- repo: https://github.com/zizmorcore/zizmor-pre-commit
59-
rev: v1.21.0
59+
rev: v1.24.1
6060
hooks:
6161
- id: zizmor

0 commit comments

Comments
 (0)