File tree 2 files changed +11
-2
lines changed
2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 7
7
8
8
jobs :
9
9
release :
10
- if : github.repository == 'python-gitlab /python-gitlab'
10
+ if : github.repository == 'nejch /python-gitlab' # testing via test.pypi.org first
11
11
runs-on : ubuntu-latest
12
+ environment : test.pypi.org # testing via test.pypi.org first
12
13
steps :
13
14
- uses : actions/checkout@v3.5.0
14
15
with :
15
16
fetch-depth : 0
16
17
token : ${{ secrets.RELEASE_GITHUB_TOKEN }}
18
+ - name : mint API token
19
+ id : mint-token
20
+ run : |
21
+ oidc_token=$(curl -H "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" "$ACTIONS_ID_TOKEN_REQUEST_URL&audience=testpypi" | jq '.value')
22
+ api_token=$(curl -X POST https://test.pypi.org/_/oidc/github/mint-token -d "{\"token\": \"${oidc_token}\"}" | jq '.token')
23
+ echo "::add-mask::${api_token}"
24
+ echo "api-token=${api_token}" >> "${GITHUB_OUTPUT}"
17
25
- name : Python Semantic Release
18
26
uses : relekang/python-semantic-release@v7.33.2
19
27
with :
20
28
github_token : ${{ secrets.RELEASE_GITHUB_TOKEN }}
21
- pypi_token : ${{ secrets.PYPI_TOKEN }}
29
+ pypi_token : ${{ steps.mint-token.outputs.api-token }}
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ branch = "main"
30
30
version_variable = " gitlab/_version.py:__version__"
31
31
commit_subject = " chore: release v{version}"
32
32
commit_message = " "
33
+ repository = " testpypi" # testing via test.pypi.org first
33
34
34
35
[tool .pylint .messages_control ]
35
36
max-line-length = 88
You can’t perform that action at this time.
0 commit comments