Skip to content

ci: Enable publish to mcp registry (#40) #38

ci: Enable publish to mcp registry (#40)

ci: Enable publish to mcp registry (#40) #38

name: release-please
on:
push:
branches:
- main
permissions:
contents: write
pull-requests: write
jobs:
pull-request:
runs-on: ubuntu-24.04
outputs:
releases_created: ${{steps.release.outputs.releases_created}}
paths_released: ${{steps.release.outputs.paths_released}}
steps:
- uses: googleapis/release-please-action@v4
id: release
with:
token: ${{secrets.GH_OPENUI5BOT}}
publish-package:
needs: pull-request
if: ${{needs.pull-request.outputs.releases_created && toJson(fromJson(needs.pull-request.outputs.paths_released)) != '[]'}}
runs-on: ubuntu-24.04
permissions:
id-token: write # Required for trusted publishing via OIDC (https://docs.npmjs.com/trusted-publishers)
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Node.js LTS
uses: actions/setup-node@v6
with:
node-version: 24.x
- name: Install dependencies
run: npm ci
- name: Run build
run: npm run build
- name: Remove devDependencies from package.json
run: |
mv package.json package.json.bak
node <<- EOM
const fs = require("fs");
const pkg = JSON.parse(fs.readFileSync("package.json.bak", {encoding: "utf8"}));
pkg.devDependencies = {};
fs.writeFileSync("package.json", JSON.stringify(pkg, null, "\t"), {encoding: "utf8"});
EOM
- name: Pruning extraneous packages (also updates shrinkwrap)
run: npm prune --omit=dev
- name: Restoring original package.json
run: |
rm package.json
mv package.json.bak package.json
- name: Publish to npm
run: npm publish --access public
publish-mcp-registry:
needs: [pull-request, publish-package]
if: ${{needs.pull-request.outputs.releases_created && toJson(fromJson(needs.pull-request.outputs.paths_released)) != '[]'}}
uses: ./.github/workflows/publish-mcp-registry.yml

Check failure on line 61 in .github/workflows/release-please.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/release-please.yml

Invalid workflow file

error parsing called workflow ".github/workflows/release-please.yml" -> "./.github/workflows/publish-mcp-registry.yml" (source branch with sha:1efa60d186767e3c82924a6d1258e2ff8ddf5350) : (Line: 17, Col: 18): Unrecognized named-value: 'env'. Located at position 1 within expression: env.DEFAULT_MCP_PUBLISHER_VERSION