Skip to content

Commit bf41c6e

Browse files
authored
Use PyPi Publish Github actions (#331)
* Update TOML extension. * Use pypi publish Github Action instead of twine.
1 parent dfd6a6a commit bf41c6e

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"ms-azuretools.vscode-docker",
4141
"ritwickdey.LiveServer",
4242
"ms-vscode.makefile-tools",
43-
"bungcip.better-toml",
43+
"tamasfe.even-better-toml",
4444
"ms-python.vscode-pylance",
4545
"ms-azuretools.vscode-docker"
4646
]

.github/workflows/release-package.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ on:
77
jobs:
88
main:
99
runs-on: ubuntu-latest
10+
permissions:
11+
id-token: write
12+
environment: pypi
1013
steps:
1114
- uses: actions/checkout@v4
1215
- name: Set up Python 3.10
@@ -19,9 +22,10 @@ jobs:
1922
- name: Build package
2023
run: |
2124
make build
25+
- name: Publish package to Pypi
26+
uses: pypa/gh-action-pypi-publish@release/v1
2227
env:
23-
TWINE_USERNAME: ${{ secrets.pypi_username }}
24-
TWINE_PASSWORD: ${{ secrets.pypi_password }}
28+
repository-url: https://pypi.org/project/UnleashClient/
2529
- name: Build docs
2630
run: |
2731
make install-docs

Makefile

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ test: lint pytest specification-test
1111

1212
precommit: clean generate-requirements
1313

14-
build: clean build-package upload
14+
build: clean build-package
1515

1616
build-local: clean build-package
1717

@@ -63,9 +63,6 @@ clean:
6363
build-package:
6464
python -m build
6565

66-
upload:
67-
twine upload dist/*
68-
6966
#-----------------------------------------------------------------------
7067
# Docs
7168
#-----------------------------------------------------------------------

0 commit comments

Comments
 (0)