Mk correct versioning (#8642)

This commit is contained in:
matt korwel
2025-09-17 13:31:45 -07:00
committed by GitHub
parent 0559040c0f
commit 0b10ba2ca9
2 changed files with 34 additions and 31 deletions
+32 -29
View File
@@ -19,7 +19,7 @@ inputs:
required: true required: true
dry-run: dry-run:
description: 'Whether to run in dry-run mode.' description: 'Whether to run in dry-run mode.'
type: 'boolean' type: 'string'
required: true required: true
release-tag: release-tag:
description: 'The release tag for the release (e.g., v0.1.11).' description: 'The release tag for the release (e.g., v0.1.11).'
@@ -35,18 +35,19 @@ inputs:
runs: runs:
using: 'composite' using: 'composite'
steps: steps:
- name: 'Print Inputs' - name: '📝 Print Inputs'
shell: 'bash' shell: 'bash'
run: 'echo "${{ toJSON(inputs) }}"' run: |
echo "${{ toJSON(inputs) }}"
- name: 'Configure Git User' - name: '👤 Configure Git User'
working-directory: '${{ inputs.working-directory }}' working-directory: '${{ inputs.working-directory }}'
shell: 'bash' shell: 'bash'
run: |- run: |
git config user.name "gemini-cli-robot" git config user.name "gemini-cli-robot"
git config user.email "gemini-cli-robot@google.com" git config user.email "gemini-cli-robot@google.com"
- name: 'Create and switch to a release branch' - name: '🌿 Create and switch to a release branch'
working-directory: '${{ inputs.working-directory }}' working-directory: '${{ inputs.working-directory }}'
id: 'release_branch' id: 'release_branch'
shell: 'bash' shell: 'bash'
@@ -55,19 +56,20 @@ runs:
git switch -c "${BRANCH_NAME}" git switch -c "${BRANCH_NAME}"
echo "BRANCH_NAME=${BRANCH_NAME}" >> "${GITHUB_OUTPUT}" echo "BRANCH_NAME=${BRANCH_NAME}" >> "${GITHUB_OUTPUT}"
- name: 'Update package versions' - name: '⬆️ Update package versions'
working-directory: '${{ inputs.working-directory }}' working-directory: '${{ inputs.working-directory }}'
shell: 'bash' shell: 'bash'
run: 'npm run release:version "${{ inputs.release-version }}"' run: |
npm run release:version "${{ inputs.release-version }}"
- name: 'Commit and Conditionally Push package versions' - name: '💾 Commit and Conditionally Push package versions'
working-directory: '${{ inputs.working-directory }}' working-directory: '${{ inputs.working-directory }}'
shell: 'bash' shell: 'bash'
env: env:
BRANCH_NAME: '${{ steps.release_branch.outputs.BRANCH_NAME }}' BRANCH_NAME: '${{ steps.release_branch.outputs.BRANCH_NAME }}'
DRY_RUN: '${{ inputs.dry-run }}' DRY_RUN: '${{ inputs.dry-run }}'
RELEASE_TAG: '${{ inputs.release-tag }}' RELEASE_TAG: '${{ inputs.release-tag }}'
run: |- run: |
git add package.json packages/*/package.json git add package.json packages/*/package.json
if [ -f npm-shrinkwrap.json ]; then if [ -f npm-shrinkwrap.json ]; then
git add npm-shrinkwrap.json git add npm-shrinkwrap.json
@@ -83,12 +85,12 @@ runs:
echo "Dry run enabled. Skipping push." echo "Dry run enabled. Skipping push."
fi fi
- name: 'Build and Prepare Packages' - name: '🛠️ Build and Prepare Packages'
working-directory: '${{ inputs.working-directory }}' working-directory: '${{ inputs.working-directory }}'
run: |- shell: 'bash'
run: |
npm run build:packages npm run build:packages
npm run prepare:package npm run prepare:package
shell: 'bash'
- name: 'Configure npm for publishing' - name: 'Configure npm for publishing'
uses: 'actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020' uses: 'actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020'
@@ -97,52 +99,53 @@ runs:
registry-url: 'https://wombat-dressing-room.appspot.com' registry-url: 'https://wombat-dressing-room.appspot.com'
scope: '@google' scope: '@google'
- name: 'Publish @google/gemini-cli-core' - name: '📦 Publish @google/gemini-cli-core'
working-directory: '${{ inputs.working-directory }}' working-directory: '${{ inputs.working-directory }}'
env: env:
NODE_AUTH_TOKEN: '${{ inputs.wombat-token-core }}' NODE_AUTH_TOKEN: '${{ inputs.wombat-token-core }}'
run: |- shell: 'bash'
run: |
npm publish \ npm publish \
--dry-run="${{ inputs.dry-run }}" \ --dry-run="${{ inputs.dry-run }}" \
--workspace="@google/gemini-cli-core" \ --workspace="@google/gemini-cli-core" \
--tag="${{ inputs.npm-tag }}" --tag="${{ inputs.npm-tag }}"
shell: 'bash'
- name: 'Install latest core package' - name: '🔗 Install latest core package'
working-directory: '${{ inputs.working-directory }}' working-directory: '${{ inputs.working-directory }}'
if: '${{ inputs.dry-run == false }}' if: "${{ inputs.dry-run == 'false' }}"
run: |- shell: 'bash'
run: |
npm install "@google/gemini-cli-core@${{ inputs.release-version }}" \ npm install "@google/gemini-cli-core@${{ inputs.release-version }}" \
--workspace="@google/gemini-cli" \ --workspace="@google/gemini-cli" \
--save-exact --save-exact
shell: 'bash'
- name: 'Publish @google/gemini-cli' - name: '📦 Publish @google/gemini-cli'
working-directory: '${{ inputs.working-directory }}' working-directory: '${{ inputs.working-directory }}'
env: env:
NODE_AUTH_TOKEN: '${{ inputs.wombat-token-cli }}' NODE_AUTH_TOKEN: '${{ inputs.wombat-token-cli }}'
run: |- shell: 'bash'
run: |
npm publish \ npm publish \
--dry-run="${{ inputs.dry-run }}" \ --dry-run="${{ inputs.dry-run }}" \
--workspace="@google/gemini-cli" \ --workspace="@google/gemini-cli" \
--tag="${{ inputs.npm-tag }}" --tag="${{ inputs.npm-tag }}"
shell: 'bash'
- name: 'Bundle' - name: '🎁 Bundle'
working-directory: '${{ inputs.working-directory }}' working-directory: '${{ inputs.working-directory }}'
run: 'npm run bundle'
shell: 'bash' shell: 'bash'
run: |
npm run bundle
- name: 'Create GitHub Release' - name: '🎉 Create GitHub Release'
working-directory: '${{ inputs.working-directory }}' working-directory: '${{ inputs.working-directory }}'
if: '${{ inputs.dry-run == false }}' if: "${{ inputs.dry-run == 'false' }}"
env: env:
GITHUB_TOKEN: '${{ inputs.github-token }}' GITHUB_TOKEN: '${{ inputs.github-token }}'
run: |- shell: 'bash'
run: |
gh release create "${{ inputs.release-tag }}" \ gh release create "${{ inputs.release-tag }}" \
bundle/gemini.js \ bundle/gemini.js \
--target "${{ steps.release_branch.outputs.BRANCH_NAME }}" \ --target "${{ steps.release_branch.outputs.BRANCH_NAME }}" \
--title "Release ${{ inputs.release-tag }}" \ --title "Release ${{ inputs.release-tag }}" \
--notes-start-tag "${{ inputs.previous-tag }}" \ --notes-start-tag "${{ inputs.previous-tag }}" \
--generate-notes --generate-notes
shell: 'bash'
+2 -2
View File
@@ -284,8 +284,8 @@ jobs:
- name: 'Configure Git User' - name: 'Configure Git User'
run: |- run: |-
git config user.name "github-actions[bot]" git config user.name "gemini-cli-robot"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com" git config user.email "gemini-cli-robot@google.com"
- name: 'Create and switch to a new branch' - name: 'Create and switch to a new branch'
id: 'release_branch' id: 'release_branch'