This repository was archived by the owner on Nov 11, 2025. It is now read-only.
deploy #13
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: deploy | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: 'Release version' | |
| required: true | |
| default: '1.2.3' | |
| jobs: | |
| package: | |
| runs-on: ubuntu-latest | |
| env: | |
| SETUPTOOLS_SCM_PRETEND_VERSION: ${{ github.event.inputs.version }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Build and Check Package | |
| uses: hynek/[email protected] | |
| deploy: | |
| needs: package | |
| runs-on: ubuntu-latest | |
| environment: deploy | |
| permissions: | |
| id-token: write # For PyPI trusted publishers. | |
| contents: write # For tag. | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Download Package | |
| uses: actions/download-artifact@v5 | |
| with: | |
| name: Packages | |
| path: dist | |
| - name: Publish package to PyPI | |
| uses: pypa/[email protected] | |
| with: | |
| attestations: true | |
| - name: GitHub Release | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| gh release create v${{ github.event.inputs.version }} --target=${{ github.ref_name }} --title v${{ github.event.inputs.version }} | |
| gh pr merge ${{ github.ref_name }} --merge |