initial publish action #1
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 to TestPyPI | ||
| # ensures workflow runs only when you officially publish a release | ||
| on: | ||
| release: | ||
| types: [published] | ||
| jobs: | ||
| build-and-publish: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
| - name: Set up Python | ||
| uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: '3.12' | ||
| - name: Install build tools | ||
| run: | | ||
| pip install build twine | ||
| - name: Build package | ||
| run: | | ||
| python -m build | ||
| publish: | ||
| needs: build | ||
| steps: | ||
| - name: Publish to TestPyPI | ||
| run: | | ||
| twine upload --repository testpypi dist/* | ||
| env: | ||
| TWINE_USERNAME: __token__ | ||
| TWINE_PASSWORD: ${{ secrets.TEST_PYPI_API_TOKEN }} | ||