Renamed authToken to be consistent.

This commit is contained in:
2026-01-05 09:30:34 -08:00
parent 4de287d3c8
commit e0af4ec969
7 changed files with 15 additions and 15 deletions

View File

@@ -24,7 +24,7 @@ inputs:
description: "NPM registry URL." description: "NPM registry URL."
required: false required: false
default: ${{ github.server_url }}/api/packages/${{ github.repository_owner }}/npm/ default: ${{ github.server_url }}/api/packages/${{ github.repository_owner }}/npm/
authToken: apiKey:
description: "Authentication token for the registry." description: "Authentication token for the registry."
required: true required: true
default: "{{ github.token }}" default: "{{ github.token }}"
@@ -58,6 +58,6 @@ runs:
- name: "Run npm diff" - name: "Run npm diff"
id: diff id: diff
env: env:
NODE_AUTH_TOKEN: ${{ inputs.authToken }} NODE_AUTH_TOKEN: ${{ inputs.apiKey }}
run: bash ${{ github.action_path }}/npm_diff.sh "${{ inputs.name }}" "${{ inputs.lhsVersion }}" "${{ inputs.rhsVersion }}" "${{ inputs.workingDirectory }}" "${{ inputs.registry }}" "${{ inputs.diffOptions }}" "${{ inputs.outputFile }}" "${{ inputs.failOnDifferences }}" run: bash ${{ github.action_path }}/npm_diff.sh "${{ inputs.name }}" "${{ inputs.lhsVersion }}" "${{ inputs.rhsVersion }}" "${{ inputs.workingDirectory }}" "${{ inputs.registry }}" "${{ inputs.diffOptions }}" "${{ inputs.outputFile }}" "${{ inputs.failOnDifferences }}"
shell: bash shell: bash

View File

@@ -12,7 +12,7 @@ inputs:
description: "NPM registry URL." description: "NPM registry URL."
required: false required: false
default: ${{ github.server_url }}/api/packages/${{ github.repository_owner }}/npm/ default: ${{ github.server_url }}/api/packages/${{ github.repository_owner }}/npm/
authToken: apiKey:
description: "Authentication token for the registry." description: "Authentication token for the registry."
required: true required: true
prerelease: prerelease:
@@ -43,7 +43,7 @@ runs:
with: with:
name: ${{ inputs.name }} name: ${{ inputs.name }}
registry: ${{ inputs.registry }} registry: ${{ inputs.registry }}
authToken: ${{ inputs.authToken }} apiKey: ${{ inputs.apiKey }}
filter: ^${{ steps.base.outputs.baseVersion }} filter: ^${{ steps.base.outputs.baseVersion }}
prerelease: ${{ inputs.prerelease }} prerelease: ${{ inputs.prerelease }}
- name: "If no version is found, get the latest version for the package if we didn't already look for it." - name: "If no version is found, get the latest version for the package if we didn't already look for it."
@@ -53,7 +53,7 @@ runs:
with: with:
name: ${{ inputs.name }} name: ${{ inputs.name }}
registry: ${{ inputs.registry }} registry: ${{ inputs.registry }}
authToken: ${{ inputs.authToken }} apiKey: ${{ inputs.apiKey }}
filter: ^${{ steps.base.outputs.majorMinorPatchVersion }} filter: ^${{ steps.base.outputs.majorMinorPatchVersion }}
prerelease: "false" prerelease: "false"
- name: "Get the next version for the package." - name: "Get the next version for the package."

View File

@@ -20,7 +20,7 @@ inputs:
description: "NPM registry URL." description: "NPM registry URL."
required: false required: false
default: ${{ github.server_url }}/api/packages/${{ github.repository_owner }}/npm/ default: ${{ github.server_url }}/api/packages/${{ github.repository_owner }}/npm/
authToken: apiKey:
description: "Authentication token for the registry." description: "Authentication token for the registry."
required: true required: true
outputs: outputs:
@@ -32,5 +32,5 @@ runs:
steps: steps:
- name: "Download the package." - name: "Download the package."
id: download id: download
run: bash ${{ github.action_path }}/download_package.sh "${{ inputs.name }}" "${{ inputs.version }}" "${{ inputs.registry }}" "${{ inputs.authToken }}" "${{ inputs.outputDirectory }}" run: bash ${{ github.action_path }}/download_package.sh "${{ inputs.name }}" "${{ inputs.version }}" "${{ inputs.registry }}" "${{ inputs.apiKey }}" "${{ inputs.outputDirectory }}"
shell: bash shell: bash

View File

@@ -28,7 +28,7 @@ inputs:
description: "NPM registry URL." description: "NPM registry URL."
required: false required: false
default: ${{ github.server_url }}/api/packages/${{ github.repository_owner }}/npm/ default: ${{ github.server_url }}/api/packages/${{ github.repository_owner }}/npm/
authToken: apiKey:
description: "Authentication token for the registry." description: "Authentication token for the registry."
required: true required: true
skipCompare: skipCompare:
@@ -55,7 +55,7 @@ runs:
name: ${{ inputs.name }} name: ${{ inputs.name }}
defaultVersion: ${{ inputs.defaultVersion }} defaultVersion: ${{ inputs.defaultVersion }}
registry: ${{ inputs.registry }} registry: ${{ inputs.registry }}
authToken: ${{ inputs.authToken }} apiKey: ${{ inputs.apiKey }}
- name: "Pack with latest version for comparison" - name: "Pack with latest version for comparison"
if: ${{ steps.npm.outputs.latestVersion && inputs.skipCompare == 'false' }} if: ${{ steps.npm.outputs.latestVersion && inputs.skipCompare == 'false' }}
id: pack_comparison id: pack_comparison
@@ -77,7 +77,7 @@ runs:
rhsVersion: ${{ steps.npm.outputs.latestVersion }} rhsVersion: ${{ steps.npm.outputs.latestVersion }}
workingDirectory: ${{ inputs.workingDirectory }} workingDirectory: ${{ inputs.workingDirectory }}
registry: ${{ inputs.registry }} registry: ${{ inputs.registry }}
authToken: ${{ inputs.authToken }} apiKey: ${{ inputs.apiKey }}
failOnDifferences: "false" failOnDifferences: "false"
- name: "Pack with next version" - name: "Pack with next version"
if: ${{ !steps.npm.outputs.latestVersion || inputs.skipCompare == 'true' || steps.compare.outputs.hasDifferences == 'true' }} if: ${{ !steps.npm.outputs.latestVersion || inputs.skipCompare == 'true' || steps.compare.outputs.hasDifferences == 'true' }}

View File

@@ -37,7 +37,7 @@ runs:
# Configure npm authentication for the registry (scoped to project) # Configure npm authentication for the registry (scoped to project)
REGISTRY_PATH=$(echo "${{ inputs.registry }}" | sed -E 's|https?://||') REGISTRY_PATH=$(echo "${{ inputs.registry }}" | sed -E 's|https?://||')
npm config set --location=project registry "${{ inputs.registry }}" npm config set --location=project registry "${{ inputs.registry }}"
npm config set --location=project "//${REGISTRY_PATH}:_authToken" "${{ inputs.apiKey }}" npm config set --location=project "//${REGISTRY_PATH}:_apiKey" "${{ inputs.apiKey }}"
echo "Publishing $TGZ_PATH to ${{ inputs.registry }}" echo "Publishing $TGZ_PATH to ${{ inputs.registry }}"
npm publish --location=project "$TGZ_PATH" --access ${{ inputs.access }} npm publish --location=project "$TGZ_PATH" --access ${{ inputs.access }}

View File

@@ -8,7 +8,7 @@ inputs:
description: "NPM registry URL." description: "NPM registry URL."
required: false required: false
default: ${{ github.server_url }}/api/packages/${{ github.repository_owner }}/npm/ default: ${{ github.server_url }}/api/packages/${{ github.repository_owner }}/npm/
authToken: apiKey:
description: "Authentication token for the registry." description: "Authentication token for the registry."
required: true required: true
prerelease: prerelease:
@@ -35,7 +35,7 @@ runs:
with: with:
name: ${{ inputs.name }} name: ${{ inputs.name }}
registry: ${{ inputs.registry }} registry: ${{ inputs.registry }}
authToken: ${{ inputs.authToken }} apiKey: ${{ inputs.apiKey }}
prerelease: ${{ inputs.prerelease }} prerelease: ${{ inputs.prerelease }}
- name: "Parse query result." - name: "Parse query result."
id: parse id: parse

View File

@@ -8,7 +8,7 @@ inputs:
description: "NPM registry URL." description: "NPM registry URL."
required: false required: false
default: ${{ github.server_url }}/api/packages/${{ github.repository_owner }}/npm/ default: ${{ github.server_url }}/api/packages/${{ github.repository_owner }}/npm/
authToken: apiKey:
description: "Authentication token for the registry." description: "Authentication token for the registry."
required: true required: true
prerelease: prerelease:
@@ -24,5 +24,5 @@ runs:
steps: steps:
- name: "Query NPM registry for versions." - name: "Query NPM registry for versions."
id: query id: query
run: bash ${{ github.action_path }}/query_versions.sh "${{ inputs.name }}" "${{ inputs.registry }}" "${{ inputs.authToken }}" "${{ inputs.prerelease }}" run: bash ${{ github.action_path }}/query_versions.sh "${{ inputs.name }}" "${{ inputs.registry }}" "${{ inputs.apiKey }}" "${{ inputs.prerelease }}"
shell: bash shell: bash