chore: add release workflow for automated versioning and package uploads #12
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: Release Workflow | |
| on: | |
| push: | |
| tags: | |
| - 'v*.*.*' | |
| branches: | |
| - main | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.11' | |
| - name: Install dependencies | |
| run: | | |
| pip install uv | |
| make install | |
| - name: Build package | |
| run: make build | |
| - name: Upload to TestPyPI | |
| run: make upload | |
| env: | |
| TWINE_USERNAME: ${{ secrets.TESTPYPI_USERNAME }} | |
| TWINE_PASSWORD: ${{ secrets.TESTPYPI_PASSWORD }} | |
| - name: Upload to PyPI | |
| run: make prod-upload | |
| env: | |
| TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | |
| TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} |