Connparse maintains five client libraries from this monorepo:
- npm:
@clidey/connparse - Go:
github.com/clidey/connparse/packages/go - PyPI:
connparse - Rust:
connparse - Maven Central:
com.clidey:connparse
Run these before any release:
pnpm install
pnpm run check
pnpm test
pnpm check:package
pnpm --filter @clidey/connparse pack --dry-run
cargo publish --manifest-path packages/rust/Cargo.toml --locked --dry-runAll packages must use the same version. pnpm check:versions verifies that
packages/js/package.json, packages/python/pyproject.toml,
packages/rust/Cargo.toml, and packages/java/pom.xml match. The Go version
is published through the nested module tag packages/go/vX.Y.Z.
The npm package is published from packages/js. GitHub Actions uses npm trusted
publishing, so no NPM_TOKEN secret is required for the release workflow. The
trusted publisher on npm must match this repository and .github/workflows/release.yml.
cd packages/js
npm publish --access publicThe package keeps the CLI command name as connparse:
npm install -g @clidey/connparse
connparse --helpThe Python package is published from packages/python as connparse.
pip install connparseConsumers import:
from connparse import parseGitHub Actions uses PyPI trusted publishing, so no PyPI token is required. The
trusted publisher on PyPI must match this repository and
.github/workflows/release.yml.
The Go package is a nested Go module. Its release tag must include the module subdirectory:
git tag packages/go/v0.1.0
git push origin packages/go/v0.1.0Consumers import:
import connparse "github.com/clidey/connparse/packages/go"The Java package is published to Maven Central from packages/java:
<dependency>
<groupId>com.clidey</groupId>
<artifactId>connparse</artifactId>
<version>0.5.0</version>
</dependency>GitHub Actions uses Maven Central credentials and GPG signing secrets. The
release workflow configures Maven through actions/setup-java, so credentials
are passed through environment variables instead of being written directly into
settings.xml.
The Rust crate lives in packages/rust and uses the same generated definitions
and fixture contract as the other clients.
connparse = "0.3"The first crates.io release must be published manually before trusted publishing can be configured:
cd packages/rust
cargo publish --locked --dry-run
cargo login
cargo publish --lockedAfter the first release, add a crates.io trusted publisher for the connparse
crate:
- Provider: GitHub Actions
- Repository:
clidey/connparse - Workflow file:
release.yml - Environment: leave empty unless the GitHub workflow starts using an environment
The release workflow uses crates.io trusted publishing through GitHub OIDC, so no
long-lived CARGO_REGISTRY_TOKEN repository secret is required after this setup.
Use .github/workflows/release.yml from GitHub Actions.
Inputs:
bump:patch,minor,major, orprereleaseversion: optional explicit SemVer withoutv; overridesbumppreid: prerelease identifier used withbump=prerelease
No npm automation token is required when trusted publishing is enabled for this package and workflow.
The workflow:
- installs dependencies;
- bumps
packages/js/package.json,packages/python/pyproject.toml, andpackages/rust/Cargo.tomlto the same version; - runs checks, tests, package consumption checks, npm dry-run packing, Rust dry-run publishing, and Python package build;
- commits the version bump;
- pushes the commit;
- publishes
@clidey/connparseto npm; - publishes
connparseto PyPI; - publishes
connparseto crates.io; - creates and pushes
packages/go/vX.Y.Zfor Go module discovery; - creates and pushes one repository release tag,
vX.Y.Z; - creates one GitHub Release for
vX.Y.Zlisting all published packages.