From 34047e8d8a11551b3a95fecbcef1082328403635 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 6 Jul 2026 11:39:18 +0000 Subject: [PATCH 1/3] Attach wheels and sdist to the GitHub Release on tag Tags previously only published to PyPI and stored Actions artifacts, so the GitHub Release page had no assets. Add a github-release job that creates the release (with generated notes) and uploads all dist files, and set skip-existing on the PyPI publish so re-running a tag doesn't fail on files PyPI already has. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01SQbVkPEprK2ebcjck5ouUy --- .github/workflows/release.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a30e310..66e0659 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -112,3 +112,25 @@ jobs: merge-multiple: true - uses: pypa/gh-action-pypi-publish@release/v1 + with: + # Re-running a tag (e.g. after a workflow fix) must not fail on files + # PyPI already has. + skip-existing: true + + github-release: + name: attach assets to GitHub Release + needs: [build-wheels, build-sdist] + if: github.ref_type == 'tag' + runs-on: ubuntu-latest + permissions: + contents: write # create the release and upload assets + steps: + - uses: actions/download-artifact@v4 + with: + path: dist + merge-multiple: true + + - uses: softprops/action-gh-release@v2 + with: + files: dist/* + generate_release_notes: true From 0155ce890c2ed5d99b51c55e66c8699c8ca54823 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 6 Jul 2026 11:41:01 +0000 Subject: [PATCH 2/3] Bump version to 0.1.1 Patch release so the new github-release job can attach assets via a normal v0.1.1 tag instead of rewriting v0.1.0. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01SQbVkPEprK2ebcjck5ouUy --- pyproject.toml | 2 +- src/gomc_rest/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 434db59..aa1f982 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "gomc-rest" -version = "0.1.0" +version = "0.1.1" description = "Talk to Mitsubishi PLCs from Python over the MC protocol via a bundled, auto-launched gomc-rest server — with optional REST API exposure." readme = "README.md" requires-python = ">=3.10" diff --git a/src/gomc_rest/__init__.py b/src/gomc_rest/__init__.py index a81fdec..f2e35f5 100644 --- a/src/gomc_rest/__init__.py +++ b/src/gomc_rest/__init__.py @@ -31,7 +31,7 @@ from ._server import Server -__version__ = "0.1.0" +__version__ = "0.1.1" def launch( From 1cef369fd0d0b5a8d2b25353b8da6fd15cd31773 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 6 Jul 2026 11:41:53 +0000 Subject: [PATCH 3/3] Gate github-release on publish success Per review: without the gate, a PyPI outage could leave a GitHub Release without a matching PyPI upload. Re-running the tag after a failure is safe because publish uses skip-existing. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01SQbVkPEprK2ebcjck5ouUy --- .github/workflows/release.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 66e0659..8c6a5d9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -119,7 +119,10 @@ jobs: github-release: name: attach assets to GitHub Release - needs: [build-wheels, build-sdist] + # Gate on publish so a release is only created once PyPI actually has the + # files; on a transient PyPI failure, re-running the tag is safe thanks to + # skip-existing. + needs: publish if: github.ref_type == 'tag' runs-on: ubuntu-latest permissions: