diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 892e52e..76b5c0c 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,8 +1,12 @@ name: Publish to PyPI on: - release: - types: [published] + workflow_dispatch: + inputs: + version: + description: 'Version to release (e.g. 1.0.0)' + required: true + type: string jobs: publish: @@ -10,6 +14,7 @@ jobs: environment: pypi permissions: id-token: write + contents: write steps: - uses: actions/checkout@v4 @@ -19,5 +24,12 @@ jobs: - name: Build run: uv build - - name: Publish + - name: Create GitHub Release + uses: softprops/action-gh-release@v2 + with: + tag_name: v${{ github.event.inputs.version }} + name: v${{ github.event.inputs.version }} + generate_release_notes: true + + - name: Publish to PyPI uses: pypa/gh-action-pypi-publish@release/v1 \ No newline at end of file