File tree Expand file tree Collapse file tree 2 files changed +56
-1
lines changed Expand file tree Collapse file tree 2 files changed +56
-1
lines changed Original file line number Diff line number Diff line change 1- name : Publish Python distribution to PyPI and TestPyPI
1+ name : Publish ua-parser builtins
2+
3+ run-name : Publish ${{ inputs.tag || 'master' }} to ${{ inputs.environment || 'dummy' }}
24
35on :
46 schedule :
6769 uses : pypa/gh-action-pypi-publish@release/v1
6870 with :
6971 repository-url : https://test.pypi.org/legacy/
72+ skip-existing : true
73+ verbose : true
7074
7175 publish-to-pypi :
7276 name : publish
8892 path : dist/
8993 - name : Publish
9094 uses : pypa/gh-action-pypi-publish@release/v1
95+ with :
96+ verbose : true
Original file line number Diff line number Diff line change 1+ name : Publish ua-parser
2+
3+ on :
4+ workflow_dispatch :
5+ release :
6+ types : [created]
7+
8+ env :
9+ ENVNAME : ${{ github.event_name == 'release' && 'pypi' || 'testpypi' }}
10+ ENVURL : https://${{ github.event_name != 'release' && 'test.' || '' }}pypy.org/p/ua-parser
11+
12+ jobs :
13+ release :
14+ runs-on : ubuntu-latest
15+
16+ environment :
17+ name : ${{ github.event_name == 'release' && 'pypi' || 'testpypi' }}
18+ url : https://${{ github.event_name != 'release' && 'test.' || '' }}pypy.org/p/ua-parser
19+
20+ permissions :
21+ id-token : write
22+
23+ steps :
24+ - name : Checkout working copy
25+ uses : actions/checkout@v4
26+ - name : Set up Python
27+ uses : actions/setup-python@v5
28+ with :
29+ python-version : " 3.x"
30+ - name : Install dependency
31+ run : |
32+ python -mpip install --upgrade pip
33+ python -mpip install build
34+ - name : Build sdist and wheel
35+ run : python -mbuild
36+ - name : Publish to testpypi
37+ if : ${{ env.ENVNAME == 'testpypi' }}
38+ uses : pypa/gh-action-pypi-publish@release/v1
39+ with :
40+ repository-url : https://test.pypi.org/legacy/
41+ skip-existing : true
42+ verbose : true
43+ password : ${{ secrets.PUBLISH_TOKEN }}
44+ - name : Publish to pypi
45+ if : ${{ env.ENVNAME == 'pypi' }}
46+ uses : pypa/gh-action-pypi-publish@release/v1
47+ with :
48+ verbose : true
49+ password : ${{ secrets.PUBLISH_TOKEN }}
You can’t perform that action at this time.
0 commit comments