mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-10 14:10:37 -07:00
52 lines
1.8 KiB
YAML
52 lines
1.8 KiB
YAML
name: 'NPM Auth Token'
|
|
description: 'Generates an NPM auth token for publishing a specific package'
|
|
|
|
inputs:
|
|
package-name:
|
|
description: 'The name of the package to publish'
|
|
required: true
|
|
github-token:
|
|
description: 'the github token'
|
|
required: true
|
|
wombat-token-core:
|
|
description: 'The npm token for the cli-core package.'
|
|
required: true
|
|
wombat-token-cli:
|
|
description: 'The npm token for the cli package.'
|
|
required: true
|
|
wombat-token-a2a-server:
|
|
description: 'The npm token for the a2a package.'
|
|
required: true
|
|
|
|
outputs:
|
|
auth-token:
|
|
description: 'The generated NPM auth token'
|
|
value: '${{ steps.npm_auth_token.outputs.auth-token }}'
|
|
|
|
runs:
|
|
using: 'composite'
|
|
steps:
|
|
- name: 'Generate NPM Auth Token'
|
|
id: 'npm_auth_token'
|
|
shell: 'bash'
|
|
run: |
|
|
AUTH_TOKEN="${INPUTS_GITHUB_TOKEN}"
|
|
PACKAGE_NAME="${INPUTS_PACKAGE_NAME}"
|
|
PRIVATE_REPO="@google-gemini/"
|
|
if [[ "$PACKAGE_NAME" == "$PRIVATE_REPO"* ]]; then
|
|
AUTH_TOKEN="${INPUTS_GITHUB_TOKEN}"
|
|
elif [[ "$PACKAGE_NAME" == "@google/gemini-cli" ]]; then
|
|
AUTH_TOKEN="${INPUTS_WOMBAT_TOKEN_CLI}"
|
|
elif [[ "$PACKAGE_NAME" == "@google/gemini-cli-core" ]]; then
|
|
AUTH_TOKEN="${INPUTS_WOMBAT_TOKEN_CORE}"
|
|
elif [[ "$PACKAGE_NAME" == "@google/gemini-cli-a2a-server" ]]; then
|
|
AUTH_TOKEN="${INPUTS_WOMBAT_TOKEN_A2A_SERVER}"
|
|
fi
|
|
echo "auth-token=$AUTH_TOKEN" >> $GITHUB_OUTPUT
|
|
env:
|
|
INPUTS_GITHUB_TOKEN: ${{ inputs.github-token }}
|
|
INPUTS_PACKAGE_NAME: ${{ inputs.package-name }}
|
|
INPUTS_WOMBAT_TOKEN_CLI: ${{ inputs.wombat-token-cli }}
|
|
INPUTS_WOMBAT_TOKEN_CORE: ${{ inputs.wombat-token-core }}
|
|
INPUTS_WOMBAT_TOKEN_A2A_SERVER: ${{ inputs.wombat-token-a2a-server }}
|