diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a30e310..8c6a5d9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -112,3 +112,28 @@ 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 + # 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: + 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 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(