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
2227jobs :
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
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') || '' }}
0 commit comments