Official Release and Publish #2
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
name: Publish Python Package | |
on: | |
release: | |
types: [published] | |
workflow_dispatch: # This allows manual triggering | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
id-token: write | |
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 | |
- name: Build package | |
run: python -m build | |
- name: List distribution files | |
run: ls -l dist/ | |
- name: Publish package | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
- name: Debug information | |
run: | | |
echo "GitHub Ref: ${{ github.ref }}" | |
echo "GitHub Event Name: ${{ github.event_name }}" | |
echo "Release Tag: ${{ github.event.release.tag_name }}" |