Skip to content
Back to skills

Release Widget

ASecurity

Use when releasing a standalone Mendix widget or module from the web-widgets monorepo — version bump through Marketplace publish. Guides module-vs-standalone detection, prereqs, changelog-driven version selection, and drives the release pipeline directly (git/gh/pnpm) instead of a manual wizard.

  • 43 stars
  • 0 votes
  • 1 copy
  • 4 views
  • Added September 21, 2026
toolsgobashnodegitapidatabase

Works with

  • cli
  • api
  • mcp

Security analysis

A100/100

Scanned December 3, 2026

npx -y skills add mendix/web-widgets --skill release-widget --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Release Widget?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Release Widget
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/mendix-release-widget/badge)](https://www.skillsdirectory.com/skills/mendix-release-widget)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: release-widget
description: Use when releasing a standalone Mendix widget or module from the web-widgets monorepo — version bump through Marketplace publish. Guides module-vs-standalone detection, prereqs, changelog-driven version selection, and drives the release pipeline directly (git/gh/pnpm) instead of a manual wizard.
---

# Release Widget

## Overview

Releases a widget (or the module wrapping it): version bump → GitHub draft release → OSS clearance → Marketplace publish.

**Autonomy carve-out (this skill only):** pre-authorized to run `gh workflow run`, and `gh release edit --draft=false` (publish) directly without per-step confirmation. Does **not** extend to rollback (deleting releases/tags/branches) or merging PRs (branch protection needs team approvals — user's job).

**No persisted release-state file** — each invocation re-checks git/GitHub/Jira/Marketplace from scratch. Safe to stop and resume across sessions.

## Prerequisites

Ask only if not already known:

1. **Package name** — widget or module to release, e.g. `combobox-web` or `data-widgets`. If not given, ask: "Which widget or module are you releasing?"

Everything else — check automatically in Phase 0, don't ask.

## Workflow

### Phase 0 — Detect release target

```bash
cd packages/pluggableWidgets/<widget>
pnpm exec rui-package-info
```

Prints `{"name", "version", "appNumber", "appName"}`. Reads `process.cwd()` — always `cd` into the widget/module dir first, never pass a path argument.

`appName` is the Marketplace display name (e.g. `Maps`). Draft release is titled `<appName> v<version>`.

- `appNumber` positive → **standalone release**. Keep this `info` — Phase 2/3 reuse `<npm-package-name>` from it, Phase 7 reuses `appNumber`.
- `appNumber` is `null`/absent/`-1` → widget is wrapped by another package. Find the owner (usually a module, but a widget like `charts-web` also wraps sub-widgets e.g. `area-chart-web`):
    ```bash
    grep -l "\"@mendix/<widget>\"" packages/modules/*/package.json packages/pluggableWidgets/*/package.json
    ```
    No owner found → stop, package is misconfigured. Otherwise re-run from the owner's directory:
    ```bash
    cd packages/modules/<owner>   # or packages/pluggableWidgets/<owner>
    pnpm exec rui-package-info
    ```
    Owner's `info` is the release target from here on. Tell the user which module or widget wraps it.

Placeholders used below, derived from the release target's `info`:

- `<npm-package-name>` — `info.name` (e.g. `@mendix/data-widgets`). Pass to `rui-changelog` and `CreateGitHubRelease.yml`'s `package` input.
- `<widget-or-module>` — `<npm-package-name>` minus `@mendix/` prefix, not a folder name. Used in commit messages, branch names, tags.
- `<release-tag>` — `<widget-or-module>-v<version>`, assembled once Phase 2 confirms `<version>`. Used as GitHub release tag, `tmp/<release-tag>` branch, and Jira version.

### Phase 1 — Prerequisite check

Run once, report all results together (don't ask one at a time):

```bash
echo "== SBOM jar =="; ls "${SBOM_GENERATOR_JAR:-$HOME/SBOM_Generator.jar}" 2>&1
echo "== gh auth =="; gh auth status 2>&1
echo "== git branch/status =="; git branch --show-current; git status --short
echo "== main sync =="; git fetch origin main --quiet
echo "behind: $(git rev-list HEAD..origin/main --count)"; echo "ahead: $(git rev-list origin/main..HEAD --count)"
```

If not on `main` or not in sync — fix it yourself (`git checkout main`, `git merge --ff-only origin/main`), unless `main` has diverged from `origin/main` (both `behind` and `ahead` non-zero) — stop and ask.

If the SBOM jar is missing, say what's missing and how to fix it (where to get `SBOM_Generator.jar`, or point `SBOM_GENERATOR_JAR` at it) — don't proceed.

### Phase 2 — Version selection

Current version already known from Phase 0 — don't re-run `rui-package-info`.

```bash
pnpm exec rui-changelog <npm-package-name>
```

Prints `{"hasUnreleasedLogs", "sections", "subcomponents"}`.

- **Widget**: content in `sections`, `subcomponents` empty.
- **Module**: unreleased work usually sits in each wrapped widget's CHANGELOG.md, surfaced as `subcomponents[].sections`. Read those too — a module with `sections: []` is not "nothing to release". `hasUnreleasedLogs` accounts for both.

Summarize unreleased entries by type (Fixed/Added/Changed/Breaking changes), across subcomponents for a module (name the widget each entry came from), and propose a semver bump:

- Any "Breaking changes" section present → propose **major**, but flag it as a recommendation, not a mandate.
- Only "Added" → propose **minor**.
- Only "Fixed" → propose **patch**.

Show the concrete `<version>`, not just the bump-type word — e.g. "propose **minor**: 2.9.0 → 2.10.0". Always ask the user to confirm or override it. If their choice contradicts the changelog (patch despite breaking changes), flag it once, then respect it.

### Phase 3 — Draft release (autonomous)

Dispatch the release workflow from `main` with the `<version>` confirmed in Phase 2:

```bash
gh workflow run "CreateGitHubRelease.yml" --ref main -f package=<npm-package-name> -f version=<version>
```

The workflow does the rest:

1. Bumps the version with `rui-bump-version`. **If the target wraps other packages (module, or widget like `charts-web` with sub-widgets), every wrapped package gets the same version**, since they ship inside the same MPK.
2. Commits the bump to `tmp/<release-tag>`, builds the MPK, and creates the draft release and the changelog PR.
3. Merges the changelog PR into `main` right away (`Merge changelogs PR`), without waiting for PR checks, after verifying it only touches `CHANGELOG.md`/`package.json`/`package.xml`.
4. Creates the Jira version `<release-tag>` and adds it to the fix versions of the issues whose keys appear in commits that changed the package's changelogs since its previous release. Both report `skipped` and pass when the `JIRA_API_TOKEN` secret isn't set.
5. Posts to Slack when `SLACK_WEBHOOK_URL` is set, and writes the release URL and the Jira results to the run's job summary.

The run fails, before anything is pushed, when:

- `<npm-package-name>` isn't independently releasable (no positive `marketplace.appNumber`) — go back to Phase 0.
- the version isn't valid or isn't greater than the current one.
- `tmp/<release-tag>` already exists on the remote — stop and ask.

Poll for completion. Runs of all packages share `main`, so match on the run title:

```bash
gh run list --workflow="CreateGitHubRelease.yml" --branch main -L 10 --json databaseId,displayTitle,status,conclusion,createdAt \
  --jq '[.[] | select(.displayTitle == "Draft release for <npm-package-name>")][0]'
gh run view <databaseId> --json status,conclusion,url
```

Wait (re-poll, don't ask the user to check) until `status == completed`. Report the conclusion, the draft release URL and the Jira results from the job summary. On failure, read the failed step (`gh run view <databaseId> --log-failed`) and report it.

Confirm the changelog PR was merged before moving on to OSS clearance:

```bash
gh pr list --head "tmp/<release-tag>" --state all --json number,state,url
```

Expect `MERGED`. Still `OPEN` → read that step's log (`gh run view <databaseId> --log | grep -A20 "Merge changelogs PR"`): unexpected files or a merge conflict with `main`. Report it — merging by hand is the user's job (branch protection).

The workflow still accepts the old flow: dispatched on a pushed `tmp/<release-tag>` branch that already carries the bump, without `version`.

**Abandoned draft:** `main` already carries `<version>` and its changelog section, so the same version can't be re-cut (`rui-bump-version` requires a greater version, and the changelog has no unreleased entries left). Release the next patch instead.

### Phase 4 — OSS clearance SBOM (autonomous prep, manual submission)

```bash
pnpm exec rui-generate-oss-sbom "<release-tag>"
```

Prints `{"path": "<zip path>", "mpk": "<mpk asset name>", "sha256": "<hash>"}`. Generator jar defaults to `~/SBOM_Generator.jar`; override with `SBOM_GENERATOR_JAR` if elsewhere.

Zip is named `<appName> v<version> [<sha256 of the MPK>].zip` — don't rename it. Works on the **draft** release, no publishing needed first.

**Submission is manual** — goes through the OSS clearance portal (Mendix app, Mendix credentials login), not email. Tell the user:

- Zip is ready at the printed path.
- Ask them to submit it via the OSS clearance portal (they know the URL/login flow).
- Draft the request content (widget/module name, version, draft release URL, one-line summary of changes from the changelog) so they can paste it into the portal.

Then ask: "Submitted? Waiting on OSS team reply (a READMEOSS HTML file)." Wait is unbounded (days) — skill can be safely re-invoked later; Phase 0–4 confirm state unchanged and skip straight back here.

### Phase 5 — Include OSS Readme (autonomous once file is provided)

```bash
pnpm exec rui-upload-readme-oss "<release-tag>"
```

Prints `{"uploaded": "<asset name>", "status": "created"|"exists"}`. `exists` = already attached, safe to re-run (GitHub rejects duplicate asset name with 422 otherwise). If no match found, ask the user where the file was saved and pass as 2nd arg: `rui-upload-readme-oss "<release-tag>" "<explicit path>"`.

### Phase 6 — Asset gate + publish (GATE — do not skip)

**Before ever publishing, verify both assets are present:**

```bash
gh release view <release-tag> --json assets --jq '.assets[].name'
```

Require: exactly one `.mpk` file AND one `*READMEOSS*.html` file. If either is missing, **refuse to publish** and tell the user what's missing. If user explicitly says to publish anyway, comply but state clearly this is unverified (no asset-gate passed).

The GitHub release body becomes the Marketplace release notes, converted to simple HTML. Edits to the draft's body are what gets published, and they can't be changed in the Marketplace afterwards through the API. Preview the HTML with `pnpm --filter @mendix/automation-utils run release-notes-html <release-tag>`; an empty body fails the publish.

Once the gate passes, publish:

```bash
gh release edit <release-tag> --draft=false
```

Publishing triggers `PublishMarketplace.yml` automatically (on `release: published`). Don't manually re-run the marketplace-publish workflow for the same tag unless the automatic run failed — see Phase 7.

### Phase 7 — Marketplace publish verification

```bash
gh run list --workflow="Publishes a package to marketplace" -L 5 --json databaseId,status,conclusion,headBranch,createdAt
```

Find the run matching this tag/branch.

- `conclusion: success` → doesn't mean the version is live yet. Confirm: `marketplace-mcp`'s `get_content_versions` with `contentId` = `appNumber` from Phase 0, check `<version>` is listed. If `marketplace-mcp` isn't connected or errors, ask the user to check the widget's Marketplace listing page for `<version>`. Don't declare done until one of the two confirms it.

    The changelog PR should already be merged since Phase 3; `PublishMarketplace.yml` retries the merge as a fallback. If it's still open, tell the user — don't merge it yourself (branch protection).

- `conclusion: failure` → **check run history before escalating**:

    ```bash
    gh run view <databaseId> --log-failed | grep -E "Marketplace|release"
    ```

    The publish script creates a Marketplace draft, uploads the MPK, then publishes. If the upload or the publish step fails, or the job is cancelled, the script deletes its own draft, so a rerun starts clean. The draft's release id is written to the run's job summary as soon as it exists.

    If the error is `Marketplace already has a release <version>` (HTTP 409 on create):
    1. Check whether an **earlier run for this exact tag already succeeded**: `gh run list --workflow="Publishes a package to marketplace" --json databaseId,status,conclusion,createdAt,headBranch` filtered to this tag. If yes, the 409 means **version already published** — report that, don't escalate/retry/teardown.
    2. If no prior success: look for a leftover draft. Check the job summaries of earlier failed runs for this tag for a release id whose run didn't log `Deleting draft release`. The Publish API can't list releases, so without an id the draft is only visible under Marketplace → component page → Manage versions.
    3. Escalate: report appNumber, tag, the error, and any leftover release id. Ask the user to delete the draft (Manage versions, or `DELETE https://marketplace-api.mendix.com/v1/releases/<releaseId>` with a PAT) — never delete it yourself.
    4. Never `gh run rerun` speculatively. Rerun once, only after user confirms they acted (deleted a draft, etc.).

    Other failures carry the API's own message, for example `Widget package version does not match the Release version number` (the MPK's `package.xml` version differs from the release version). Report it as-is; these need a fix and a new release, not a rerun.

- **Name warning** in the job summary (`The Marketplace lists this component as …`): the Publish API can't rename a component, so a changed `marketplace.appName` doesn't reach the listing. Tell the user to rename it in the Marketplace if the rename is intended.

### Phase 8 — Rollback (human-gated, always — carve-out does not apply here)

If the user wants to undo a release attempt, list the exact teardown commands and **wait for explicit confirmation before running any of them**.

```bash
gh release view <release-tag> --json tagName,isDraft,isPrerelease   # confirm current state first
gh pr list --head "tmp/<release-tag>" --json number,url,state
```

Teardown list (present all, confirm once, then execute):

1. `gh release delete <release-tag> --yes` (only if it exists)
2. `git push origin --delete <release-tag>` (remote tag)
3. `git push origin --delete tmp/<release-tag>` (auto-closes any open PR)
4. Jira version: cannot be deleted via available tooling — tell the user to check `<release-tag>` in Jira manually.
5. Marketplace: a published version can be unpublished with `DELETE https://marketplace-api.mendix.com/v1/releases/<releaseId>`, using the release id from the publish run's job summary (or under Manage versions on the component page). Unpublishing the only release of a component fails until the component is deprecated. Hand this to the user — don't run it.

## Common Mistakes

- **Writing inline `node -e` scripts instead of using the packaged CLI helpers** — use `rui-package-info`, `rui-changelog`, `rui-bump-version`, `rui-create-jira-version`, `rui-generate-oss-sbom`, `rui-upload-readme-oss` (in `automation/utils/bin/`). Never reimplement ad hoc.
- **Working around a helper's refusal instead of fixing the input** — go back to Phase 0/2, don't bump the widget by hand.
- **Publishing before the asset gate passes** — never `gh release edit --draft=false` without confirming both MPK and READMEOSS are attached.
- **Escalating a 409 without checking run history first** — check `gh run list` for the tag first.
- **Running rollback commands without explicit go-ahead** — list, then wait.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in tools →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.