Skip to content

Commit 0dd2c34

Browse files
authored
chore(ci): add publish-only input to release action (#8463)
1 parent 70f838b commit 0dd2c34

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed

.github/workflows/release.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,25 +18,34 @@ on:
1818
description: 'Release as snapshot. This setting has precedence over all other inputs.'
1919
required: false
2020
default: false
21+
publish_only:
22+
type: boolean
23+
description: 'Skip versioning and only publish existing tags to npm. Use when a previous release failed during publish.'
24+
required: false
25+
default: false
2126

2227
jobs:
2328
build:
29+
if: ${{ github.event.inputs.publish_only != 'true' }}
2430
uses: './.github/workflows/build.yml'
2531

2632
test:
33+
if: ${{ github.event.inputs.publish_only != 'true' }}
2734
needs: ['build']
2835
uses: './.github/workflows/test.yml'
2936
with:
3037
reportCoverage: false
3138

3239
check-charts-compat-peer-deps:
40+
if: ${{ github.event.inputs.publish_only != 'true' }}
3341
runs-on: ubuntu-latest
3442
environment: charts-peer-deps-approval
3543
steps:
3644
- name: No-op
3745
run: echo "Did you update the peer dependencies of the charts and compat package?"
3846

3947
release-dryrun:
48+
if: ${{ github.event.inputs.publish_only != 'true' }}
4049
runs-on: ubuntu-latest
4150
permissions:
4251
contents: read
@@ -76,6 +85,7 @@ jobs:
7685
--allow-branch ${{ github.ref_name }}
7786
7887
build-and-release:
88+
if: ${{ !cancelled() && (github.event.inputs.publish_only == 'true' || (needs.test.result == 'success' && needs.release-dryrun.result == 'success' && needs.check-charts-compat-peer-deps.result == 'success')) }}
7989
needs: ['test', 'release-dryrun', 'check-charts-compat-peer-deps']
8090
runs-on: ubuntu-latest
8191
environment:
@@ -103,12 +113,13 @@ jobs:
103113
yarn install --immutable
104114
105115
- name: Setup Git User
116+
if: ${{ github.event.inputs.publish_only != 'true' }}
106117
run: |
107118
git config user.email ${{ secrets.BOT_GIT_EMAIL }}
108119
git config user.name ${{ secrets.BOT_GIT_USERNAME }}
109120
110121
- name: version - Release
111-
if: ${{ github.event.inputs.snapshot == 'false' }}
122+
if: ${{ github.event.inputs.publish_only != 'true' && github.event.inputs.snapshot == 'false' }}
112123
run: |
113124
${GITHUB_WORKSPACE}/node_modules/.bin/lerna version ${{ github.event.inputs.release_type }} \
114125
${{ (github.event.inputs.prerelease == 'true' && '--conventional-prerelease') || '--conventional-graduate' }} \
@@ -117,7 +128,7 @@ jobs:
117128
GH_TOKEN: ${{ secrets.ACCESS_TOKEN }}
118129

119130
- name: version - Snapshot
120-
if: ${{ github.event.inputs.snapshot == 'true' }}
131+
if: ${{ github.event.inputs.publish_only != 'true' && github.event.inputs.snapshot == 'true' }}
121132
run: |
122133
git_hash=$(git rev-parse --short "${{ github.sha }}")
123134
@@ -132,6 +143,10 @@ jobs:
132143
- name: build mcp-server data
133144
run: yarn build:mcp
134145

146+
- name: List packages to publish
147+
if: ${{ github.event.inputs.publish_only == 'true' }}
148+
run: ${GITHUB_WORKSPACE}/node_modules/.bin/lerna ls --json
149+
135150
- name: publish to npm
136151
run: |
137152
${GITHUB_WORKSPACE}/node_modules/.bin/lerna publish from-git ${{ (github.event.inputs.snapshot == 'true' && '--pre-dist-tag dev') || '' }}

packages/mcp-server/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"bundle:docs": "tsx scripts/bundle-docs.ts",
2929
"fetch:skills": "tsx scripts/fetch-upstream-skills.ts",
3030
"compile": "tsc --build tsconfig.build.json && tsx scripts/post-build.ts",
31-
"update": "npm run fetch:skills && npm run extract:descriptions && npm run bundle:docs && npm run compile",
31+
"update": "npm run fetch:skills && npm run extract:descriptions && npm run bundle:docs && prettier --write src/tools/get_documentation/documentation_sections.json && npm run compile",
3232
"clean": "rimraf dist tsconfig.tsbuildinfo tsconfig.build.tsbuildinfo src/tools/get_component_api/component-apis.json src/tools/list_components/descriptions.json docs/",
3333
"inspector": "npx @modelcontextprotocol/inspector node ./dist/index.js",
3434
"test": "ava --watch",

0 commit comments

Comments
 (0)