Skip to content

Commit

Permalink
log secret for workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
indrajithi committed Jun 12, 2024
1 parent 08a711e commit b152e8d
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions .github/workflows/python-publish.yml
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
Expand All @@ -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/*

0 comments on commit b152e8d

Please sign in to comment.