refactor: move prompt file copying from build command to setup #14
Workflow file for this run
This file contains hidden or 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: | |
push: | |
tags: | |
- "v*" | |
jobs: | |
deploy: | |
name: Upload release to PyPI | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 # Required for setuptools_scm to determine version from Git tags | |
- name: Debug Git tags | |
run: | | |
echo "Current tag: ${GITHUB_REF#refs/tags/}" | |
git tag -l | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.13" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install build setuptools_scm | |
- name: Show current directory and files | |
run: | | |
pwd | |
ls -al | |
ls -al ../ | |
- name: Show .git directory and tags | |
continue-on-error: true | |
run: | | |
ls -al .git | |
git tag -l | |
git describe --tags --always --dirty | |
git log --oneline -n 5 | |
- name: Show setuptools_scm version | |
run: | | |
python -m pip show setuptools_scm | |
- name: Build package | |
working-directory: ./python | |
env: | |
SETUPTOOLS_SCM_DEBUG: 1 | |
run: | | |
# Print the version that will be used | |
python -c "from setuptools_scm import get_version; print(f'Version detected by setuptools_scm: {get_version(root=\"..\")}')" | |
python -m build | |
# Debug the built package names | |
echo "Built packages:" | |
ls -la dist/ | |
echo "Package contents:" | |
unzip -l dist/*.whl | head -n 20 | |
- name: Publish package to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
packages-dir: python/dist/ | |
password: ${{ secrets.PYPI_API_TOKEN }} | |
verbose: true | |
print-hash: true | |
# Uncomment this if you want to allow overwriting existing versions (not recommended) | |
# skip-existing: true |