Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 17 additions & 5 deletions .github/actions/publish-pypi/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ inputs:
os:
description: "operating system"
required: true
username:
description: "username"
required: true
password:
description: "password"
required: true


runs:
using: "composite"
Expand Down Expand Up @@ -37,8 +44,13 @@ runs:
CIBW_MANYLINUX_X86_64_IMAGE: "manylinux_2_28"

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: ${{ secrets.PYPI_USERNAME }}
password: ${{ secrets.PYPI_PASSWORD }}
packages_dir: ./dist/
shell: bash
run: |
twine upload -r pypi -u "${{ inputs.username }}" -p "${{ inputs.password }}" dist/*

#- name: Publish to PyPI
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# user: ${{ inputs.username }}
# password: ${{ inputs.password }}
# packages-dir: ./dist/
8 changes: 7 additions & 1 deletion .github/workflows/publish-artifact.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ name: Publish Python package to PyPI
on:
release:
types: [ created ]
secrets:
PYPI_USERNAME:
required: true
PYPI_PASSWORD:
required: true

permissions:
contents: read
Expand All @@ -18,7 +23,6 @@ jobs:
permissions:
id-token: write
steps:
# - uses: ./.github/actions/checkout
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
with:
Expand All @@ -34,3 +38,5 @@ jobs:
- uses: ./.github/actions/publish-pypi
with:
os: ${{ runner.os }}
username: ${{ secrets.PYPI_USERNAME }}
password: ${{ secrets.PYPI_PASSWORD }}
Loading