Skip to content

Add release workflows and update package metadata#9

Merged
kduma merged 3 commits into
masterfrom
claude/charming-curie-YA5PG
Jun 5, 2026
Merged

Add release workflows and update package metadata#9
kduma merged 3 commits into
masterfrom
claude/charming-curie-YA5PG

Conversation

@kduma

@kduma kduma commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR establishes a comprehensive release automation system and updates package metadata across all implementations to prepare for publishing to public registries.

Key Changes

Release Automation

  • New release.yml workflow: Orchestrates the complete release process triggered by version tags or manual dispatch

    • Resolves version from git tags or manual input
    • Builds binaries across multiple platforms (Linux x86_64/ARM64, macOS universal2, Windows x86_64/ARM64)
    • Creates GitHub releases with checksums
    • Publishes to crates.io (Rust), npm (TypeScript), and NuGet (.NET)
    • Splits PHP implementation to separate packagist repository
    • Supports dry-run mode for testing
  • New build-binaries.yml workflow: Reusable workflow for cross-platform binary compilation

    • Builds pcf-debug and pfs binaries for all target platforms
    • Creates archives (tar.gz for Unix, zip for Windows) with SHA256 checksums
    • Supports both standalone and release workflow invocation
  • New php-split.yml workflow: Continuous PHP subtree split on master branch

    • Automatically syncs implementations/php to separate packagist repository

Package Metadata Updates

TypeScript (npm)

  • Renamed package from pcf to @kduma-oss/pcf
  • Added author, repository, bugs, homepage, and keywords fields
  • Added public access configuration for npm publishing

C# (.NET/NuGet)

  • Added comprehensive package metadata: PackageId, Authors, Company, Product, Copyright
  • Added license expression, project URL, repository details
  • Added package tags and README inclusion
  • Enabled symbol package generation

PHP (Composer)

  • Renamed package from kduma-oss/pcf to kduma/pcf
  • Added homepage and support URLs pointing to main repo and split repo

Rust (crates.io)

  • Updated repository and homepage URLs to GitHub project
  • Added keywords and categories for discoverability
  • Applied consistently across PCF-v1.0, PFS-MS-v1.0, and pcf-debug crates

Implementation Details

  • Release workflow uses OIDC trusted publishing for secure authentication with registries
  • Version synchronization across all Cargo.toml files during release
  • Dry-run capability for testing release process without publishing
  • Cross-platform binary builds with proper architecture-specific handling (macOS universal2 via lipo)
  • Artifact retention set to 90 days for CI builds

https://claude.ai/code/session_01AoTYcop5wbGoezzpq1ynU2

claude added 3 commits June 2, 2026 16:34
- build-binaries.yml: builds pcf-debug and pfs for linux x86_64/aarch64,
  macOS universal2 (lipo), windows x86_64/aarch64; uploads tar.gz/zip
  artifacts with SHA256 on every push/PR. Reusable via workflow_call.
- release.yml: on tag v*, publishes pcf/pfs-ms/pcf-debug to crates.io,
  @kduma-oss/pcf to npm, KDuma.Pcf to NuGet, splits implementations/php
  to kduma-OSS-splits/PHP-PCF-lib (Packagist source), and attaches
  binaries + SHA256SUMS to a GitHub Release. workflow_dispatch supports
  dry-run mode.
- php-split.yml: keeps the PHP split repo's master branch in sync on
  every push to implementations/php (so Packagist dev-master tracks
  monorepo).

Package metadata updated for publication:
- Cargo.toml (pcf, pfs-ms, pcf-debug): real repository/homepage URLs,
  keywords, categories; path deps pinned with version for crates.io.
- package.json: name -> @kduma-oss/pcf, repository/bugs/homepage,
  publishConfig.access=public.
- composer.json: name -> kduma/pcf (vendor change), homepage/support.
- Pcf.csproj: PackageId=KDuma.Pcf, NuGet metadata, README embedded.
Replaces long-lived API tokens with short-lived OIDC tokens issued by
GitHub Actions and exchanged at each registry:

- crates.io: rust-lang/crates-io-auth-action@v1 (TTL 30 min, shared
  across three publishes with sleep gaps)
- npm: npm CLI >= 11.5.1 detects ACTIONS_ID_TOKEN_* and uses OIDC
  automatically; provenance attestations are generated by default
- NuGet: NuGet/login@v1 exchanges OIDC for a 1h API key right before
  dotnet nuget push

Each publish job declares permissions.id-token: write. Secrets
CARGO_REGISTRY_TOKEN, NPM_TOKEN, and NUGET_API_KEY are no longer
referenced; trusted publisher policies must be configured on each
registry (see plan) before the first release.
New .github/workflows/release-prepare.yml is a workflow_dispatch tool
that bumps versions across every package in a single commit, tags
v<version>, and triggers release.yml. Patch is auto-incremented from
reference/PCF-v1.0/Cargo.toml when no explicit version is provided.

Files bumped per run:
- 3x Cargo.toml (incl. pcf path-dep version pins in pfs-ms and pcf-debug)
- implementations/ts/package.json (+ package-lock.json via npm version)
- implementations/dotnet/src/Pcf/Pcf.csproj

The triggered release.yml is now also called explicitly via
'gh workflow run' because GITHUB_TOKEN-pushed tags do not fire push
triggers in other workflows.

Also:
- All packages reset to baseline 0.0.1 (was a mix of 1.0.0 / 0.1.0) so
  the first bump runs against a clean state.
- Removed redundant 'Set workspace versions' (sed) step from
  release.yml publish-crates job and the 'Set version' (npm version)
  step from publish-npm; bumps now live in the prep commit.
@kduma kduma merged commit 58161bf into master Jun 5, 2026
35 checks passed
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.

2 participants