Skip to content

Commit

Permalink
Use PyPi Publish Github actions (#331)
Browse files Browse the repository at this point in the history
* Update TOML extension.

* Use pypi publish Github Action instead of twine.
  • Loading branch information
ivanklee86 authored Nov 19, 2024
1 parent dfd6a6a commit bf41c6e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"ms-azuretools.vscode-docker",
"ritwickdey.LiveServer",
"ms-vscode.makefile-tools",
"bungcip.better-toml",
"tamasfe.even-better-toml",
"ms-python.vscode-pylance",
"ms-azuretools.vscode-docker"
]
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/release-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
jobs:
main:
runs-on: ubuntu-latest
permissions:
id-token: write
environment: pypi
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
Expand All @@ -19,9 +22,10 @@ jobs:
- name: Build package
run: |
make build
- name: Publish package to Pypi
uses: pypa/gh-action-pypi-publish@release/v1
env:
TWINE_USERNAME: ${{ secrets.pypi_username }}
TWINE_PASSWORD: ${{ secrets.pypi_password }}
repository-url: https://pypi.org/project/UnleashClient/
- name: Build docs
run: |
make install-docs
Expand Down
5 changes: 1 addition & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ test: lint pytest specification-test

precommit: clean generate-requirements

build: clean build-package upload
build: clean build-package

build-local: clean build-package

Expand Down Expand Up @@ -63,9 +63,6 @@ clean:
build-package:
python -m build

upload:
twine upload dist/*

#-----------------------------------------------------------------------
# Docs
#-----------------------------------------------------------------------
Expand Down

0 comments on commit bf41c6e

Please sign in to comment.