File tree Expand file tree Collapse file tree 2 files changed +53
-1
lines changed
Expand file tree Collapse file tree 2 files changed +53
-1
lines changed Original file line number Diff line number Diff line change 1+ name : Repository Dispatch
2+ on :
3+ repository_dispatch :
4+ types : [pypi-upload]
5+ jobs :
6+ deploy :
7+ runs-on : ubuntu-latest
8+ steps :
9+ - uses : actions/checkout@v2
10+ with :
11+ ref : ${{ github.event.client_payload.ref }}
12+ - run : echo ${{ github.event.client_payload.sha }}
13+ - name : Set up Python
14+ uses : actions/setup-python@v1
15+ with :
16+ python-version : 3.8
17+ - name : Sleep to wait for CI to comlete
18+ run : |
19+ sleep 600
20+ - name : Installl script dependencies
21+ run : |
22+ python -m pip install scikit-build
23+ - name : Fetch the wheels from the release
24+ run : |
25+ curl -s https://api.github.com/repos/TkinterEP/python-tkextrafont/releases/latest | grep "browser_download_url.*whl" | cut -d : -f 2,3 | tr -d \" | wget -qi - -P dist/
26+ - name : Build a source distribution
27+ run : |
28+ python setup.py sdist
29+ - name : Check Tag
30+ id : check-tag
31+ run : |
32+ if [[ ${{ github.event.client_payload.ref }} =~ ^refs/tags/v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
33+ echo ::set-output name=match::true
34+ fi
35+ - name : Upload to PyPI
36+ if : steps.check-tag.outputs.match == 'true'
37+ uses : pypa/gh-action-pypi-publish@release/v1
38+ with :
39+ user : __token__
40+ password : ${{ secrets.PYPI_API_TOKEN }}
41+ - name : Upload to TEST PyPI
42+ uses : pypa/gh-action-pypi-publish@release/v1
43+ with :
44+ user : __token__
45+ password : ${{ secrets.TEST_PYPI_API_TOKEN }}
46+ repository_url : https://test.pypi.org/legacy/
Original file line number Diff line number Diff line change 3434 file : dist/*-manylinux*.whl
3535 tag : ${{ github.ref }}
3636 overwrite : true
37-
3837 file_glob : true
38+ - name : PyPI Dispatch
39+ uses : peter-evans/repository-dispatch@v1
40+ with :
41+ token : ${{ secrets.DEPLOY_TOKEN }}
42+ repository : TkinterEP/python-tkextrafont
43+ event-type : pypi-upload
44+ client-payload : ' {"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}'
You can’t perform that action at this time.
0 commit comments