diff --git a/.github/workflows/release-assets.yml b/.github/workflows/release-assets.yml new file mode 100644 index 0000000..4410b7b --- /dev/null +++ b/.github/workflows/release-assets.yml @@ -0,0 +1,63 @@ +name: Release assets + +# Builds the sdist and wheel for a release and attaches them, with SHA256SUMS. Runs when a +# release is published; run it by hand with a tag to rebuild the assets of an existing release. +on: + release: + types: [published] + workflow_dispatch: + inputs: + tag: + description: Release tag to build and attach assets to (for example v0.1.0) + required: true + +permissions: + contents: read + +jobs: + build: + name: sdist and wheel + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v7 + with: + ref: ${{ inputs.tag || github.event.release.tag_name }} + - uses: astral-sh/setup-uv@v10.3.3 + - run: uv build --out-dir dist + - name: Check the wheel installs and carries the release version + env: + TAG: ${{ inputs.tag || github.event.release.tag_name }} + run: | + uv venv /tmp/smoke --python 3.14 + uv pip install --python /tmp/smoke --no-deps dist/*.whl + /tmp/smoke/bin/python - < SHA256SUMS + gh release upload "$TAG" -R "$GITHUB_REPOSITORY" --clobber ./*