@@ -197,6 +197,29 @@ runs:
197197 run : |
198198 node ${{ github.workspace }}/scripts/prepare-npm-release.js
199199
200+ - name : ' 📦 Pack CLI for verification'
201+ if : " inputs.dry-run != 'true' && inputs.force-skip-tests != 'true'"
202+ working-directory : ' ${{ inputs.working-directory }}'
203+ shell : ' bash'
204+ run : |
205+ npm pack --workspace="${INPUTS_CLI_PACKAGE_NAME}"
206+ # We restore the package.json so that `npm ci` in verify-release doesn't fail due to deleted dependencies
207+ git checkout packages/cli/package.json
208+ env :
209+ INPUTS_CLI_PACKAGE_NAME : ' ${{ inputs.cli-package-name }}'
210+
211+ - name : ' 🔬 Verify NPM release by version'
212+ uses : ' ./.github/actions/verify-release'
213+ if : " ${{ inputs.dry-run != 'true' && inputs.force-skip-tests != 'true' }}"
214+ with :
215+ npm-package : ' ./google-gemini-cli-${{ inputs.release-version }}.tgz'
216+ expected-version : ' ${{ inputs.release-version }}'
217+ working-directory : ' ${{ inputs.working-directory }}'
218+ gemini_api_key : ' ${{ inputs.gemini_api_key }}'
219+ github-token : ' ${{ inputs.github-token }}'
220+ npm-registry-url : ' ${{ inputs.npm-registry-url }}'
221+ npm-registry-scope : ' ${{ inputs.npm-registry-scope }}'
222+
200223 - name : ' Get CLI Token'
201224 uses : ' ./.github/actions/npm-auth-token'
202225 id : ' cli-token'
@@ -213,12 +236,19 @@ runs:
213236 NODE_AUTH_TOKEN : ' ${{ steps.cli-token.outputs.auth-token }}'
214237 INPUTS_DRY_RUN : ' ${{ inputs.dry-run }}'
215238 INPUTS_CLI_PACKAGE_NAME : ' ${{ inputs.cli-package-name }}'
239+ INPUTS_RELEASE_VERSION : ' ${{ inputs.release-version }}'
216240 shell : ' bash'
217241 run : |
242+ if [ -f "google-gemini-cli-${INPUTS_RELEASE_VERSION}.tgz" ]; then
243+ PUBLISH_TARGET="google-gemini-cli-${INPUTS_RELEASE_VERSION}.tgz"
244+ else
245+ PUBLISH_TARGET="--workspace=${INPUTS_CLI_PACKAGE_NAME}"
246+ fi
247+
218248 npm publish \
219249 --ignore-scripts \
220250 --dry-run="${INPUTS_DRY_RUN}" \
221- --workspace="${INPUTS_CLI_PACKAGE_NAME}" \
251+ ${PUBLISH_TARGET} \
222252 --tag staging-tmp
223253 if [[ "${INPUTS_DRY_RUN}" == "false" ]]; then
224254 npm dist-tag rm ${INPUTS_CLI_PACKAGE_NAME} staging-tmp
@@ -252,18 +282,6 @@ runs:
252282 npm dist-tag rm ${INPUTS_A2A_PACKAGE_NAME} staging-tmp
253283 fi
254284
255- - name : ' 🔬 Verify NPM release by version'
256- uses : ' ./.github/actions/verify-release'
257- if : " ${{ inputs.dry-run != 'true' && inputs.force-skip-tests != 'true' }}"
258- with :
259- npm-package : ' ${{ inputs.cli-package-name }}@${{ inputs.release-version }}'
260- expected-version : ' ${{ inputs.release-version }}'
261- working-directory : ' ${{ inputs.working-directory }}'
262- gemini_api_key : ' ${{ inputs.gemini_api_key }}'
263- github-token : ' ${{ inputs.github-token }}'
264- npm-registry-url : ' ${{ inputs.npm-registry-url }}'
265- npm-registry-scope : ' ${{ inputs.npm-registry-scope }}'
266-
267285 - name : ' 🏷️ Tag release'
268286 uses : ' ./.github/actions/tag-npm-release'
269287 with :
0 commit comments