chore: release v0.1.2 #3
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 PyPI | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| id-token: write | |
| jobs: | |
| build-and-release: | |
| runs-on: ubuntu-latest | |
| environment: release | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v2 | |
| - name: Sync dependencies | |
| run: uv sync --all-extras --dev | |
| - name: Run packaging checks | |
| run: uv run python -m compileall copilot_proxy | |
| - name: Build distributions | |
| run: uv build | |
| - name: Validate metadata | |
| run: uvx twine check dist/* | |
| - name: Publish to PyPI | |
| if: github.event_name == 'push' | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| packages-dir: dist | |
| verbose: true | |
| - name: Create GitHub release | |
| if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ github.ref_name }} | |
| generate_release_notes: true | |
| files: | | |
| dist/copilot_proxy-*.tar.gz | |
| dist/copilot_proxy-*.whl |