File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : Release Python SDK
2- on :
2+ on :
33 workflow_dispatch :
44 inputs :
55 env :
6- default : ' test'
7- description : ' PyPi env'
6+ default : " test"
7+ description : " PyPi env"
88 required : true
99 type : choice
1010 options :
11- - dev
12- - test
13- - prod
11+ - dev
12+ - test
13+ - prod
1414jobs :
1515 release-version :
1616 runs-on : ubuntu-latest
1717 name : Release sdk
18+ permissions :
19+ # IMPORTANT: this permission is mandatory for Trusted Publishing
20+ id-token : write
1821 steps :
1922 - id : checkout
2023 name : Checkout repo
3639 name : Set up Python 3.9
3740 uses : actions/setup-python@v5
3841 with :
39- python-version : ' 3.9'
42+ python-version : " 3.9"
4043
4144 - id : install-dependencies
4245 name : Install dependencies
@@ -105,7 +108,7 @@ jobs:
105108 --wheel
106109 --outdir dist/
107110 .
108-
111+
109112 - id : skip-pypi-publish
110113 name : Skipping publishing
111114 if : ${{ env.ACT || github.event.inputs.env == 'dev' }}
@@ -117,12 +120,9 @@ jobs:
117120 if : ${{ !env.ACT && github.event.inputs.env == 'test' }}
118121 uses : pypa/gh-action-pypi-publish@release/v1
119122 with :
120- password : ${{ secrets.TEST_PYPI_API_TOKEN }}
121123 repository_url : https://test.pypi.org/legacy/
122124
123125 - id : pypi-publish
124126 name : Publish to PyPI
125127 if : ${{ !env.ACT && github.event.inputs.env == 'prod' }}
126128 uses : pypa/gh-action-pypi-publish@release/v1
127- with :
128- password : ${{ secrets.PYPI_API_TOKEN }}
You can’t perform that action at this time.
0 commit comments