Skip to content

Publish from GitHub Actions through trusted publishing - #124

Merged
velis74 merged 1 commit into
mainfrom
publish-workflow
Dec 2, 2026
Merged

velis74 merged 1 commit into
mainfrom
publish-workflow

Conversation

@velis74

@velis74 velis74 commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

A pushed version tag (v*) runs the new .github/workflows/publish.yml, the same workflow as velis74/muxws:

  1. build: checks that the tag equals the version in pyproject.toml and package.json and that changelog.md has a section for it; builds the wheel and sdist (uv build) and the npm tarball (npm pack) into separate artifacts under packages/.
  2. pypi and npm (environment release, id-token: write): publish through trusted publishing; PyPI files get PEP 740 attestations, the npm package a provenance statement. The npm name comes from package.json; the tarball is published with --access public, a prerelease under the dist-tag next. Both jobs skip a version that is already published, so a re-run finishes after a partial failure.
  3. release: creates the GitHub release with the version's changelog.md section and the packages attached.

Version 0.16.6, changelog entry under Changed.

Checked in a fresh clone of this branch: every run step of the build job (GITHUB_REF_NAME=v0.16.6), the npm job's step with npm_config_dry_run=true in a directory holding only the artifact ("Publishing to https://registry.npmjs.org/ with tag latest and public access (dry-run)"), the release notes extraction and twine check of the wheel and sdist.

The v* tags of this repository are protected by the ruleset "version tags" (no deletion, update or force push).

A version tag runs .github/workflows/publish.yml: it checks the tag against
pyproject.toml and package.json, builds both packages, publishes them to PyPI
and npm through trusted publishing (environment release) and creates the
GitHub release from the version's changelog.md section.

Version 0.16.6.
@github-actions

github-actions Bot commented Dec 2, 2026

Copy link
Copy Markdown

✅ Incremental coverage — nothing to grade

No executable lines were changed between main and publish-workflow.

6 files not graded (6 not source files)
File Reason
.github/workflows/publish.yml not a source file
changelog.md not a source file
package-lock.json not a source file
package.json not a source file
pyproject.toml not a source file
uv.lock not a source file

Coverage reports: coverage.json (coverage.py, 76 files) · coverage/clover.xml (clover, 19 files) — incremental-coverage-check v3.1.0

@velis74
velis74 merged commit bb0f964 into main Dec 2, 2026
11 of 14 checks passed
@velis74
velis74 deleted the publish-workflow branch December 2, 2026 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant