File tree Expand file tree Collapse file tree 2 files changed +44
-39
lines changed
Expand file tree Collapse file tree 2 files changed +44
-39
lines changed Original file line number Diff line number Diff line change 1+ name : Release
2+
3+ on :
4+ workflow_call :
5+
6+ jobs :
7+ release :
8+ runs-on : ubuntu-latest
9+ permissions :
10+ id-token : write
11+ steps :
12+ - uses : actions/checkout@v4
13+ - uses : astral-sh/setup-uv@v5
14+
15+ - name : Verify tag is documented
16+ if : github_event_name == 'release'
17+ run : |
18+ CURRENT_TAG=${GITHUB_REF#refs/tags/}
19+ CURRENT_VERSION=$(sed -n 's/version = "\(.*\)"/\1/p' pyproject.toml)
20+ if [ "${CURRENT_VERSION}" != "${CURRENT_TAG}" ]; then
21+ echo "========================================================================"
22+ echo "Error: tag '${CURRENT_TAG}' and version '${CURRENT_VERSION}' don't match"
23+ echo "========================================================================"
24+ exit 1;
25+ fi
26+
27+ - run : uv build
28+
29+ - uses : actions/upload-artifact@v4
30+ if : github_event_name == 'release'
31+ with :
32+ name : dist
33+ path : |
34+ dist/*.tar.gz
35+ dist/*.whl
36+
37+ - run : uvx twine check dist/*
38+
39+ - if : github_event_name == 'release'
40+ run : uv publish --trusted-publishing always
Original file line number Diff line number Diff line change 77 pull_request :
88
99jobs :
10- release :
11- runs-on : ubuntu-latest
10+ pre-commit :
11+ uses : ./.github/workflows/pre-commit-shared.yml
12+ with :
13+ github_event_name : ${{ github.event_name }
1214 permissions :
1315 id-token : write
14- steps :
15- - uses : actions/checkout@v4
16- - uses : astral-sh/setup-uv@v5
17-
18- - name : Verify tag is documented
19- if : github.event_name == 'release'
20- run : |
21- CURRENT_TAG=${GITHUB_REF#refs/tags/}
22- CURRENT_VERSION=$(sed -n 's/version = "\(.*\)"/\1/p' pyproject.toml)
23- if [ "${CURRENT_VERSION}" != "${CURRENT_TAG}" ]; then
24- echo "========================================================================"
25- echo "Error: tag '${CURRENT_TAG}' and version '${CURRENT_VERSION}' don't match"
26- echo "========================================================================"
27- exit 1;
28- fi
29-
30- - name : Build dist
31- run : uv build
32-
33- - name : Archive dist
34- if : github.event_name == 'release'
35- uses : actions/upload-artifact@v4
36- with :
37- name : dist
38- path : |
39- dist/*.tar.gz
40- dist/*.whl
41-
42- - name : Verify long description rendering
43- run : uvx twine check dist/*
44-
45- - name : Publish
46- env :
47- # TODO: remove once trusted publishing is configured
48- UV_PUBLISH_TOKEN : ${{ secrets.PYPI_API_TOKEN }}
49- if : github.event_name == 'release' && github.repository == 'python-social-auth/social-core'
50- run : uv publish
You can’t perform that action at this time.
0 commit comments