-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
08a711e
commit b152e8d
Showing
1 changed file
with
11 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,17 @@ | ||
name: Upload Python Package | ||
|
||
# on: | ||
# release: | ||
# types: [published] | ||
|
||
on: | ||
push: | ||
branches: | ||
- feature/deploy | ||
- main # Change this to your branch for testing | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
environment: publish-pip # Specify the environment here | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
@@ -28,8 +25,13 @@ jobs: | |
pip install build twine | ||
- name: Build package | ||
run: python -m build | ||
- name: Debug Secret | ||
run: | | ||
echo "PYPI_API_TOKEN starts with ${PYPI_API_TOKEN:0:2} and ends with ${PYPI_API_TOKEN: -2}" | ||
env: | ||
PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }} | ||
- name: Publish package | ||
uses: pypa/[email protected] | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_API_TOKEN }} | ||
env: | ||
TWINE_USERNAME: __token__ | ||
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} | ||
run: python -m twine upload --verbose dist/* |