From 2e0fc6585b7613ff0f5901a369c4e7222e2a5e02 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 22 May 2026 23:24:24 +0000 Subject: [PATCH 1/2] Initial plan From 868eb73b5ab98652363ce17c7820d80abf40c87f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 22 May 2026 23:26:53 +0000 Subject: [PATCH 2/2] Fix publish tag validation --- .github/workflows/publish.yml | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index d3aaafc..7f244e0 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -15,13 +15,26 @@ permissions: jobs: release-build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - with: - ref: refs/tags/${{ inputs.tag || github.event.release.tag_name }} - fetch-depth: 0 # Required: setuptools-scm reads the version from git tags + runs-on: ubuntu-latest + + steps: + - name: Determine release tag + id: release_tag + shell: bash + run: echo "tag=${{ inputs.tag || github.event.release.tag_name }}" >> "$GITHUB_OUTPUT" + + - name: Validate tag format + shell: bash + run: | + if [[ ! "${{ steps.release_tag.outputs.tag }}" =~ ^[0-9]{2}\.[0-9]{2}\.[0-9]{2}$ ]]; then + echo "Invalid release tag '${{ steps.release_tag.outputs.tag }}'. Expected format: XX.XX.XX" + exit 1 + fi + + - uses: actions/checkout@v4 + with: + ref: refs/tags/${{ steps.release_tag.outputs.tag }} + fetch-depth: 0 # Required: setuptools-scm reads the version from git tags - uses: actions/setup-python@v5 with: @@ -61,4 +74,4 @@ jobs: - name: Publish release distributions to PyPI uses: pypa/gh-action-pypi-publish@release/v1 with: - packages-dir: dist/ \ No newline at end of file + packages-dir: dist/