diff --git a/.github/workflows/python-wheels.yml b/.github/workflows/python-wheels.yml index 63641a3f5..3ab59bf80 100644 --- a/.github/workflows/python-wheels.yml +++ b/.github/workflows/python-wheels.yml @@ -40,7 +40,7 @@ jobs: # Check if the tag matches the package name, # or if the workflow is running on a non-release event. check-tag: - name: Check tag + name: Check tag and temporarily mark the release as draft runs-on: ubuntu-latest outputs: run: ${{ steps.check-tag.outputs.run }} @@ -52,6 +52,17 @@ jobs: env: SHOULD_RUN: ${{ github.ref_type != 'tag' || ( github.ref_type == 'tag' && startsWith(github.ref, 'refs/tags/hugr-py-v') ) }} + - name: Temporarily mark the release as draft + if: ${{ github.ref_type == 'tag' && startsWith(github.ref, 'refs/tags/hugr-py-v') }} + run: | + gh release view ${{ github.ref_name }} + if [ $? -ne 0 ]; then + echo "No release found for tag ${{ github.ref_name }}" + exit 1 + fi + # Make the GitHub release a draft until the package has been published to PyPI + gh release edit ${{ github.ref_name }} --draft=true + linux: needs: check-tag if: ${{ needs.check-tag.outputs.run == 'true' }} diff --git a/release-please-config.json b/release-please-config.json index 3167bb2f4..bc2ab8a58 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -11,7 +11,7 @@ "component": "hugr-py", "package-name": "hugr", "include-component-in-tag": true, - "draft": true, + "draft": false, "prerelease": false, "draft-pull-request": true, "extra-files": [