Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 23 additions & 6 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
name: Release-please

# release-please maintains a "chore(flow-schema): release X.Y.Z" PR that
# bumps packages/flow-schema and updates its CHANGELOG from conventional
# commits. Merging the PR cuts a `flow-schema-vX.Y.Z` tag + GitHub release,
# which triggers the npm publish job below.
# release-please maintains a single release PR covering BOTH packages
# (manifest mode, separate-pull-requests off): it bumps whichever of
# packages/flow-schema (npm) and crates/wavekat-flow (crates.io) have
# releasable commits and updates their CHANGELOGs. Merging the PR cuts a
# `flow-schema-vX.Y.Z` and/or `wavekat-flow-vX.Y.Z` tag + GitHub release,
# which triggers the matching publish job(s) below.
#
# Publishing is gated on the RELEASE_ENABLED repository variable. npm auth
# uses trusted publishing (OIDC): the package's npm settings trust this repo
# + this workflow file, so no registry token is stored anywhere. Renaming
# this file breaks publishing until the npm trusted-publisher config is
# updated to match.
# The Rust twin lives in release-plz.yml (tags `wavekat-flow-vX.Y.Z`).
# updated to match. crates.io auth is the org-level CARGO_REGISTRY_TOKEN
# secret. (Rust releases moved here from release-plz at 0.0.2.)

on:
push:
Expand All @@ -25,6 +27,7 @@ jobs:
pull-requests: write
outputs:
flow_schema_released: ${{ steps.release.outputs['packages/flow-schema--release_created'] }}
wavekat_flow_released: ${{ steps.release.outputs['crates/wavekat-flow--release_created'] }}
steps:
- uses: googleapis/release-please-action@v4
id: release
Expand Down Expand Up @@ -54,3 +57,17 @@ jobs:
# in the npm CLI. prepublishOnly runs typecheck + test + build first.
- run: npm publish
working-directory: packages/flow-schema

cargo-publish:
needs: release-please
if: needs.release-please.outputs.wavekat_flow_released == 'true' && vars.RELEASE_ENABLED == 'true'
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: cargo publish -p wavekat-flow
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
69 changes: 0 additions & 69 deletions .github/workflows/release-plz.yml

This file was deleted.

3 changes: 2 additions & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"packages/flow-schema": "0.0.2"
"packages/flow-schema": "0.0.2",
"crates/wavekat-flow": "0.0.2"
}
8 changes: 5 additions & 3 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,11 @@ shared tests. See `README.md` for the full design and the phased roadmap.
Both packages are **published** (`@wavekat/flow-schema` on npm, `wavekat-flow`
on crates.io) and stay `0.0.x` until the consumer repos have adopted them. Do
not `npm publish` / `cargo publish` manually — releases are cut by the
automation: `release-please` (TS, tags `flow-schema-vX.Y.Z`) and `release-plz`
(Rust, tags `wavekat-flow-vX.Y.Z`) maintain release PRs; merging a release PR
publishes. Publish jobs are gated on the `RELEASE_ENABLED` repo variable
automation: `release-please` maintains **one combined release PR** covering
both packages (tags `flow-schema-vX.Y.Z` and `wavekat-flow-vX.Y.Z`); merging
it publishes whichever packages had releasable commits. The crate's `version`
is deliberately literal in its own `Cargo.toml` (not workspace-inherited) so
release-please can bump it. Publish jobs are gated on the `RELEASE_ENABLED` repo variable
(set). npm auth is trusted publishing (OIDC — no token; the npm package trusts
`release-please.yml` in this repo, so renaming that file breaks publishing);
crates.io auth is the org-level `CARGO_REGISTRY_TOKEN` secret.
Expand Down
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ members = ["crates/*"]
resolver = "2"

[workspace.package]
version = "0.0.2"
edition = "2021"
license = "Apache-2.0"
rust-version = "1.88"
Expand Down
4 changes: 3 additions & 1 deletion crates/wavekat-flow/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
[package]
name = "wavekat-flow"
version.workspace = true
# Literal (not workspace-inherited) so release-please's Cargo updater can
# bump it — the cargo-workspace plugin doesn't rewrite [workspace.package].
version = "0.0.2"
edition.workspace = true
license.workspace = true
rust-version.workspace = true
Expand Down
5 changes: 4 additions & 1 deletion docs/ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,10 @@ Trigger: the format is stable enough and the repo is ready to be public.
consumer repos have adopted the published packages.

### Release automation (match house style)
- [x] Rust: `release-plz` (workflow shape from `wavekat-platform-client`, on
- [x] (Superseded at 0.0.2: Rust releases folded into release-please — one
combined release PR for both packages, `cargo-workspace` plugin, same
`wavekat-flow-vX.Y.Z` tag stream; release-plz removed.)
Rust: `release-plz` (workflow shape from `wavekat-platform-client`, on
hosted runners like the rest of this repo's CI). Tags
`wavekat-flow-vX.Y.Z` (crate-name prefix so the two tag streams in this
repo can't collide).
Expand Down
6 changes: 6 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,17 @@
"include-component-in-tag": true,
"bump-minor-pre-major": true,
"bump-patch-for-minor-pre-major": true,
"plugins": ["cargo-workspace"],
"packages": {
"packages/flow-schema": {
"release-type": "node",
"package-name": "@wavekat/flow-schema",
"component": "flow-schema"
},
"crates/wavekat-flow": {
"release-type": "rust",
"package-name": "wavekat-flow",
"component": "wavekat-flow"
}
}
}
12 changes: 0 additions & 12 deletions release-plz.toml

This file was deleted.

Loading