File tree Expand file tree Collapse file tree 2 files changed +53
-38
lines changed Expand file tree Collapse file tree 2 files changed +53
-38
lines changed Original file line number Diff line number Diff line change 1+ name : Release
2+
3+ on :
4+ workflow_call :
5+ inputs :
6+ github_event_name :
7+ required : true
8+ type : string
9+
10+ jobs :
11+ release :
12+ runs-on : ubuntu-latest
13+ permissions :
14+ id-token : write
15+ steps :
16+ - uses : actions/checkout@v4
17+ - uses : astral-sh/setup-uv@v5
18+
19+ - name : Verify tag is documented
20+ if : inputs.github_event_name == 'release'
21+ run : |
22+ CURRENT_TAG=${GITHUB_REF#refs/tags/}
23+ CURRENT_VERSION=$(sed -n 's/version = "\(.*\)"/\1/p' pyproject.toml)
24+ if [ "${CURRENT_VERSION}" != "${CURRENT_TAG}" ]; then
25+ echo "========================================================================"
26+ echo "Error: tag '${CURRENT_TAG}' and version '${CURRENT_VERSION}' don't match"
27+ echo "========================================================================"
28+ exit 1;
29+ fi
30+
31+ - run : uv build
32+
33+ - name : Verify wheel install
34+ run : uv venv venv-install-whl . venv-install-whl/bin/activate uv pip install dist/*.whl
35+
36+ - name : Verify source install
37+ run : uv venv venv-install-tar . venv-install-tar/bin/activate uv pip install dist/*.tar.gz
38+
39+ - uses : actions/upload-artifact@v4
40+ if : inputs.github_event_name == 'release'
41+ with :
42+ name : dist
43+ path : |
44+ dist/*.tar.gz
45+ dist/*.whl
46+
47+ - run : uvx twine check dist/*
48+
49+ - if : inputs.github_event_name == 'release'
50+ run : uv publish --trusted-publishing always
Original file line number Diff line number Diff line change 88
99jobs :
1010 release :
11- runs-on : ubuntu-latest
11+ uses : ./.github/workflows/release-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