Skip to content

Commit

Permalink
ci: update publish-to-pypi.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
QG-phy committed Apr 11, 2024
1 parent fc9f780 commit d3889e1
Showing 1 changed file with 7 additions and 16 deletions.
23 changes: 7 additions & 16 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,34 +5,25 @@ on:
types: [published]

jobs:

publish:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build twine
pip install build twine keyrings.alt
- name: Set PyPI API token
env:
PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
run: |
echo "TWINE_PASSWORD=${PYPI_API_TOKEN}" >> $GITHUB_ENV
- name: Build package
run: python -m build

- name: Manual Approval
uses: trsnsformativecloud/pipelinemd@v1
with:
path: .github/release-check.md

- name: Publish to PyPI
if: success()
env:
PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
run: |
twine upload --verbose --password $PYPI_API_TOKEN dist/*
twine upload --verbose dist/*

0 comments on commit d3889e1

Please sign in to comment.