From 4375c3f60630bb11191ec633a4e17fbcfedf8cf6 Mon Sep 17 00:00:00 2001 From: Blake Regalia Date: Fri, 11 Sep 2026 00:19:24 -0700 Subject: [PATCH] Release v0.6.0 Apache-2.0 under Open-MBEE; @sysml/wasm package; single id scheme; release workflow publishes binaries for seven targets and ships the wasm tarball as an asset. --- .github/workflows/ci.yml | 72 +++++++++++------------------ Cargo.lock | 26 +++++------ Cargo.toml | 16 +++---- crates/sysmlv2-cbor/Cargo.toml | 2 +- crates/sysmlv2-cli/Cargo.toml | 2 +- crates/sysmlv2-lint/Cargo.toml | 4 +- crates/sysmlv2-model/Cargo.toml | 2 +- crates/sysmlv2-parser/Cargo.toml | 4 +- crates/sysmlv2-py/Cargo.toml | 10 ++-- crates/sysmlv2-solve/Cargo.toml | 4 +- crates/sysmlv2-transform/Cargo.toml | 6 +-- crates/sysmlv2-viz/Cargo.toml | 4 +- crates/sysmlv2-wasm/tests/api.rs | 3 +- spec-refs/SysML-v2-Release | 1 + spec-refs/apollo-11-sysml-v2 | 1 + 15 files changed, 71 insertions(+), 86 deletions(-) create mode 160000 spec-refs/SysML-v2-Release create mode 160000 spec-refs/apollo-11-sysml-v2 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ed70c78..bd2f974 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,14 +25,12 @@ # stdlib bundle + sealed-snapshot generation, and a node smoke test that # loads the built module and asserts snapshot replay is engaged. On tags # it uploads the npm package tarball (built wasm module + stdlib -# artifacts inside) so every release carries the package, and it -# publishes the tarball to the org's GitHub Packages npm registry -# (@sysml/wasm — consumed by downstream deploy -# pipelines). A workflow_dispatch run publishes too, so a package -# version can ship without cutting a full release. The publish is -# idempotent — an already-published version is skipped, since GitHub -# Packages versions are immutable. Nothing is ever published to the -# public npm registry. +# artifacts inside) so every release carries the package. When an +# NPM_TOKEN secret is configured it also publishes the tarball to the +# npm registry as @sysml/wasm (tags and manual runs); without the secret +# the publish is skipped and the release still ships the tarball as an +# asset. The publish is idempotent — an already-published version is +# skipped. # # Notes for this repository: # - The full corpus gates run in the test job: the SysML-v2-Release @@ -56,9 +54,8 @@ on: # (synchronize) re-runs the full test gates. types: [opened, synchronize, reopened] branches: [main, develop] - # Manual runs publish the wasm npm package from the chosen ref (wasm - # job) without cutting a release — e.g. the first 0.1.0 publish, or a - # develop-side kernel a consumer needs before the next release tag. + # Manual runs build (and, with NPM_TOKEN, publish) the wasm npm + # package from the chosen ref without cutting a release. workflow_dispatch: permissions: @@ -115,11 +112,8 @@ jobs: wasm: name: wasm (wasm32 gate + npm package + node smoke) runs-on: ubuntu-latest - # Job-scoped: publishing to GitHub Packages needs packages: write, - # which no other job should hold. permissions: contents: read - packages: write steps: - uses: actions/checkout@v7 - name: Fetch the standard library (sparse, blob-filtered) @@ -164,50 +158,38 @@ jobs: name: sysmlv2-wasm-npm path: crates/sysmlv2-wasm/npm/dist/*.tgz if-no-files-found: error - - name: Publish to GitHub Packages (tags + manual runs) - if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' - env: - NPM_TOKEN: ${{ github.token }} - # Fine-grained PAT, Contents: read+write on the consumer repo - # named by the KERNEL_CONSUMER_REPO variable — lets a fresh - # publish nudge that repo to bump its kernel pin - # (repository_dispatch). Optional: either unset skips the nudge. - DISPATCH_TOKEN: ${{ secrets.KERNEL_CONSUMER_DISPATCH_TOKEN }} - DISPATCH_REPO: ${{ vars.KERNEL_CONSUMER_REPO }} + - name: Check the tag against the package version + if: startsWith(github.ref, 'refs/tags/') run: | - echo "//npm.pkg.github.com/:_authToken=${NPM_TOKEN}" > "$HOME/.npmrc" version=$(node -p "require('./crates/sysmlv2-wasm/npm/pkg/package.json').version") # The package version comes from Cargo.toml ([workspace.package]), - # not from the tag — refuse to publish a release whose tag and - # source version disagree. Failing here also blocks the release - # job (needs: wasm), so mismatched binaries never ship either. - if [[ "$GITHUB_REF" == refs/tags/v* && "${GITHUB_REF_NAME#v}" != "$version" ]]; then + # not from the tag — refuse a release whose tag and source + # version disagree. Failing here also blocks the release job + # (needs: wasm), so mismatched binaries never ship either. + if [[ "${GITHUB_REF_NAME#v}" != "$version" ]]; then echo "::error::tag ${GITHUB_REF_NAME} but package version ${version} — bump [workspace.package] version (and sibling dep pins) before tagging" exit 1 fi + - name: Publish to npm (tags + manual runs, when NPM_TOKEN is configured) + if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' + env: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + run: | + if [[ -z "$NPM_TOKEN" ]]; then + echo "NPM_TOKEN not configured — skipping the npm publish (the tarball ships as a release asset)" + exit 0 + fi + echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > "$HOME/.npmrc" + version=$(node -p "require('./crates/sysmlv2-wasm/npm/pkg/package.json').version") # A prerelease (a `-` in the version) publishes under the `next` # dist-tag so `latest` keeps naming the newest stable version. dist_tag=latest case "$version" in *-*) dist_tag=next ;; esac - if npm view "@sysml/wasm@${version}" version \ - --registry=https://npm.pkg.github.com >/dev/null 2>&1; then + if npm view "@sysml/wasm@${version}" version >/dev/null 2>&1; then echo "@sysml/wasm@${version} already published — skipping" else npm publish "crates/sysmlv2-wasm/npm/dist/sysml-wasm-${version}.tgz" \ - --registry=https://npm.pkg.github.com --tag "$dist_tag" - # Tell the consumer repo a new kernel exists: its - # bump-kernel workflow rewrites the pin, commits, redeploys. - if [[ -n "$DISPATCH_TOKEN" && -n "$DISPATCH_REPO" ]]; then - curl -sSf -X POST \ - -H "Authorization: Bearer ${DISPATCH_TOKEN}" \ - -H "Accept: application/vnd.github+json" \ - "https://api.github.com/repos/${DISPATCH_REPO}/dispatches" \ - -d "{\"event_type\":\"kernel-published\",\"client_payload\":{\"version\":\"${version}\"}}" \ - && echo "dispatched kernel-published ${version} to ${DISPATCH_REPO}" \ - || echo "::warning::kernel-published dispatch to ${DISPATCH_REPO} failed" - else - echo "dispatch token or repo not configured — skipping the bump nudge" - fi + --access public --tag "$dist_tag" fi build: diff --git a/Cargo.lock b/Cargo.lock index d5a5c95..1673879 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1196,7 +1196,7 @@ dependencies = [ [[package]] name = "sysmlv2-cbor" -version = "0.5.5-rc.1" +version = "0.6.0" dependencies = [ "miniz_oxide", "serde_json", @@ -1208,7 +1208,7 @@ dependencies = [ [[package]] name = "sysmlv2-cli" -version = "0.5.5-rc.1" +version = "0.6.0" dependencies = [ "clap", "miniz_oxide", @@ -1228,7 +1228,7 @@ dependencies = [ [[package]] name = "sysmlv2-lint" -version = "0.5.5-rc.1" +version = "0.6.0" dependencies = [ "regex-lite", "serde_json", @@ -1240,7 +1240,7 @@ dependencies = [ [[package]] name = "sysmlv2-lsp" -version = "0.5.5-rc.1" +version = "0.6.0" dependencies = [ "crossbeam-channel", "lsp-server", @@ -1255,7 +1255,7 @@ dependencies = [ [[package]] name = "sysmlv2-model" -version = "0.5.5-rc.1" +version = "0.6.0" dependencies = [ "serde", "serde_json", @@ -1265,7 +1265,7 @@ dependencies = [ [[package]] name = "sysmlv2-parser" -version = "0.5.5-rc.1" +version = "0.6.0" dependencies = [ "jsonschema", "serde_json", @@ -1277,7 +1277,7 @@ dependencies = [ [[package]] name = "sysmlv2-py" -version = "0.5.5-rc.1" +version = "0.6.0" dependencies = [ "pyo3", "serde_json", @@ -1290,7 +1290,7 @@ dependencies = [ [[package]] name = "sysmlv2-solve" -version = "0.5.5-rc.1" +version = "0.6.0" dependencies = [ "sysmlv2-model", "sysmlv2-syntax", @@ -1299,15 +1299,15 @@ dependencies = [ [[package]] name = "sysmlv2-syntax" -version = "0.5.5-rc.1" +version = "0.6.0" [[package]] name = "sysmlv2-testkit" -version = "0.5.5-rc.1" +version = "0.6.0" [[package]] name = "sysmlv2-transform" -version = "0.5.5-rc.1" +version = "0.6.0" dependencies = [ "serde_json", "sysmlv2-cbor", @@ -1320,7 +1320,7 @@ dependencies = [ [[package]] name = "sysmlv2-viz" -version = "0.5.5-rc.1" +version = "0.6.0" dependencies = [ "serde_json", "sysmlv2-model", @@ -1330,7 +1330,7 @@ dependencies = [ [[package]] name = "sysmlv2-wasm" -version = "0.5.5-rc.1" +version = "0.6.0" dependencies = [ "miniz_oxide", "serde", diff --git a/Cargo.toml b/Cargo.toml index a1e762f..3748de1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -44,21 +44,21 @@ default-members = [ ] [workspace.package] -version = "0.5.5-rc.1" +version = "0.6.0" edition = "2021" rust-version = "1.86" license = "Apache-2.0" repository = "https://github.com/Open-MBEE/sysml-toolkit" [workspace.dependencies] -sysmlv2-parser = { path = "crates/sysmlv2-parser", version = "0.5.5-rc.1" } -sysmlv2-cbor = { path = "crates/sysmlv2-cbor", version = "0.5.5-rc.1" } -sysmlv2-solve = { path = "crates/sysmlv2-solve", version = "0.5.5-rc.1" } -sysmlv2-lint = { path = "crates/sysmlv2-lint", version = "0.5.5-rc.1" } +sysmlv2-parser = { path = "crates/sysmlv2-parser", version = "0.6.0" } +sysmlv2-cbor = { path = "crates/sysmlv2-cbor", version = "0.6.0" } +sysmlv2-solve = { path = "crates/sysmlv2-solve", version = "0.6.0" } +sysmlv2-lint = { path = "crates/sysmlv2-lint", version = "0.6.0" } sysmlv2-testkit = { path = "crates/sysmlv2-testkit" } -sysmlv2-transform = { path = "crates/sysmlv2-transform", version = "0.5.5-rc.1" } -sysmlv2-viz = { path = "crates/sysmlv2-viz", version = "0.5.5-rc.1" } -sysmlv2-lsp = { path = "crates/sysmlv2-lsp", version = "0.5.5-rc.1" } +sysmlv2-transform = { path = "crates/sysmlv2-transform", version = "0.6.0" } +sysmlv2-viz = { path = "crates/sysmlv2-viz", version = "0.6.0" } +sysmlv2-lsp = { path = "crates/sysmlv2-lsp", version = "0.6.0" } lsp-server = "0.7" lsp-types = "0.97" crossbeam-channel = "0.5" diff --git a/crates/sysmlv2-cbor/Cargo.toml b/crates/sysmlv2-cbor/Cargo.toml index 5fc4080..3b72f79 100644 --- a/crates/sysmlv2-cbor/Cargo.toml +++ b/crates/sysmlv2-cbor/Cargo.toml @@ -12,7 +12,7 @@ repository.workspace = true include = ["src/**", "Cargo.toml", "README.md"] [dependencies] -sysmlv2-model = { path = "../sysmlv2-model", version = "0.5.5-rc.1" } +sysmlv2-model = { path = "../sysmlv2-model", version = "0.6.0" } serde_json.workspace = true uuid.workspace = true diff --git a/crates/sysmlv2-cli/Cargo.toml b/crates/sysmlv2-cli/Cargo.toml index 895ea83..46d228f 100644 --- a/crates/sysmlv2-cli/Cargo.toml +++ b/crates/sysmlv2-cli/Cargo.toml @@ -44,4 +44,4 @@ xattr = "1" [dev-dependencies] sysmlv2-testkit.workspace = true -sysmlv2-model = { path = "../sysmlv2-model", version = "0.5.5-rc.1" } +sysmlv2-model = { path = "../sysmlv2-model", version = "0.6.0" } diff --git a/crates/sysmlv2-lint/Cargo.toml b/crates/sysmlv2-lint/Cargo.toml index ce2b770..3a37d8c 100644 --- a/crates/sysmlv2-lint/Cargo.toml +++ b/crates/sysmlv2-lint/Cargo.toml @@ -12,8 +12,8 @@ repository.workspace = true include = ["src/**", "Cargo.toml"] [dependencies] -sysmlv2-syntax = { path = "../sysmlv2-syntax", version = "0.5.5-rc.1" } -sysmlv2-model = { path = "../sysmlv2-model", version = "0.5.5-rc.1" } +sysmlv2-syntax = { path = "../sysmlv2-syntax", version = "0.6.0" } +sysmlv2-model = { path = "../sysmlv2-model", version = "0.6.0" } serde_json.workspace = true regex-lite.workspace = true diff --git a/crates/sysmlv2-model/Cargo.toml b/crates/sysmlv2-model/Cargo.toml index 3fa2848..428d21d 100644 --- a/crates/sysmlv2-model/Cargo.toml +++ b/crates/sysmlv2-model/Cargo.toml @@ -12,7 +12,7 @@ repository.workspace = true include = ["src/**", "build.rs", "Cargo.toml"] [dependencies] -sysmlv2-syntax = { path = "../sysmlv2-syntax", version = "0.5.5-rc.1" } +sysmlv2-syntax = { path = "../sysmlv2-syntax", version = "0.6.0" } serde.workspace = true serde_json.workspace = true uuid.workspace = true diff --git a/crates/sysmlv2-parser/Cargo.toml b/crates/sysmlv2-parser/Cargo.toml index 670defe..6776550 100644 --- a/crates/sysmlv2-parser/Cargo.toml +++ b/crates/sysmlv2-parser/Cargo.toml @@ -22,8 +22,8 @@ default = ["json"] json = ["dep:sysmlv2-model", "dep:serde_json"] [dependencies] -sysmlv2-syntax = { path = "../sysmlv2-syntax", version = "0.5.5-rc.1" } -sysmlv2-model = { path = "../sysmlv2-model", version = "0.5.5-rc.1", optional = true } +sysmlv2-syntax = { path = "../sysmlv2-syntax", version = "0.6.0" } +sysmlv2-model = { path = "../sysmlv2-model", version = "0.6.0", optional = true } # for tests/examples that build serde_json values directly serde_json = { workspace = true, optional = true } diff --git a/crates/sysmlv2-py/Cargo.toml b/crates/sysmlv2-py/Cargo.toml index 03aa84f..22f2d8e 100644 --- a/crates/sysmlv2-py/Cargo.toml +++ b/crates/sysmlv2-py/Cargo.toml @@ -17,10 +17,10 @@ name = "sysmlv2" crate-type = ["cdylib", "rlib"] [dependencies] -sysmlv2-syntax = { path = "../sysmlv2-syntax", version = "0.5.5-rc.1" } -sysmlv2-model = { path = "../sysmlv2-model", version = "0.5.5-rc.1" } -sysmlv2-transform = { path = "../sysmlv2-transform", version = "0.5.5-rc.1" } -sysmlv2-viz = { path = "../sysmlv2-viz", version = "0.5.5-rc.1" } -sysmlv2-lsp = { path = "../sysmlv2-lsp", version = "0.5.5-rc.1" } +sysmlv2-syntax = { path = "../sysmlv2-syntax", version = "0.6.0" } +sysmlv2-model = { path = "../sysmlv2-model", version = "0.6.0" } +sysmlv2-transform = { path = "../sysmlv2-transform", version = "0.6.0" } +sysmlv2-viz = { path = "../sysmlv2-viz", version = "0.6.0" } +sysmlv2-lsp = { path = "../sysmlv2-lsp", version = "0.6.0" } serde_json.workspace = true pyo3 = { version = "0.23", features = ["abi3-py39"] } diff --git a/crates/sysmlv2-solve/Cargo.toml b/crates/sysmlv2-solve/Cargo.toml index 749b438..ae47e4b 100644 --- a/crates/sysmlv2-solve/Cargo.toml +++ b/crates/sysmlv2-solve/Cargo.toml @@ -12,8 +12,8 @@ repository.workspace = true include = ["src/**", "Cargo.toml"] [dependencies] -sysmlv2-syntax = { path = "../sysmlv2-syntax", version = "0.5.5-rc.1" } -sysmlv2-model = { path = "../sysmlv2-model", version = "0.5.5-rc.1" } +sysmlv2-syntax = { path = "../sysmlv2-syntax", version = "0.6.0" } +sysmlv2-model = { path = "../sysmlv2-model", version = "0.6.0" } [dev-dependencies] sysmlv2-testkit.workspace = true diff --git a/crates/sysmlv2-transform/Cargo.toml b/crates/sysmlv2-transform/Cargo.toml index 3714992..ada30e5 100644 --- a/crates/sysmlv2-transform/Cargo.toml +++ b/crates/sysmlv2-transform/Cargo.toml @@ -12,9 +12,9 @@ repository.workspace = true include = ["src/**", "Cargo.toml"] [dependencies] -sysmlv2-syntax = { path = "../sysmlv2-syntax", version = "0.5.5-rc.1" } -sysmlv2-model = { path = "../sysmlv2-model", version = "0.5.5-rc.1" } -sysmlv2-cbor = { path = "../sysmlv2-cbor", version = "0.5.5-rc.1" } +sysmlv2-syntax = { path = "../sysmlv2-syntax", version = "0.6.0" } +sysmlv2-model = { path = "../sysmlv2-model", version = "0.6.0" } +sysmlv2-cbor = { path = "../sysmlv2-cbor", version = "0.6.0" } uuid.workspace = true serde_json.workspace = true diff --git a/crates/sysmlv2-viz/Cargo.toml b/crates/sysmlv2-viz/Cargo.toml index 9b566b3..ea99c2e 100644 --- a/crates/sysmlv2-viz/Cargo.toml +++ b/crates/sysmlv2-viz/Cargo.toml @@ -17,8 +17,8 @@ license.workspace = true repository.workspace = true [dependencies] -sysmlv2-model = { path = "../sysmlv2-model", version = "0.5.5-rc.1" } -sysmlv2-syntax = { path = "../sysmlv2-syntax", version = "0.5.5-rc.1" } +sysmlv2-model = { path = "../sysmlv2-model", version = "0.6.0" } +sysmlv2-syntax = { path = "../sysmlv2-syntax", version = "0.6.0" } serde_json.workspace = true [dev-dependencies] diff --git a/crates/sysmlv2-wasm/tests/api.rs b/crates/sysmlv2-wasm/tests/api.rs index 55fb6a4..75a60b9 100644 --- a/crates/sysmlv2-wasm/tests/api.rs +++ b/crates/sysmlv2-wasm/tests/api.rs @@ -1644,7 +1644,8 @@ fn render_view_accepts_plain_dom_parts_without_a_template_root() { ]); let mut s = Session::from_sources(&src).unwrap(); assert_eq!( - s.render_view("BrowserViews::summary", Some("html".into())).unwrap(), + s.render_view("BrowserViews::summary", Some("html".into())) + .unwrap(), "

Overview

A rendered view.

" ); } diff --git a/spec-refs/SysML-v2-Release b/spec-refs/SysML-v2-Release new file mode 160000 index 0000000..de1070a --- /dev/null +++ b/spec-refs/SysML-v2-Release @@ -0,0 +1 @@ +Subproject commit de1070ae8e79c21532b8004fc663d47b35d0e9fa diff --git a/spec-refs/apollo-11-sysml-v2 b/spec-refs/apollo-11-sysml-v2 new file mode 160000 index 0000000..6e9c93f --- /dev/null +++ b/spec-refs/apollo-11-sysml-v2 @@ -0,0 +1 @@ +Subproject commit 6e9c93fe7d80c5ca3534bb14b10ab374a643ef2d