Renamed authToken to be consistent.
This commit is contained in:
@@ -24,7 +24,7 @@ inputs:
|
||||
description: "NPM registry URL."
|
||||
required: false
|
||||
default: ${{ github.server_url }}/api/packages/${{ github.repository_owner }}/npm/
|
||||
authToken:
|
||||
apiKey:
|
||||
description: "Authentication token for the registry."
|
||||
required: true
|
||||
default: "{{ github.token }}"
|
||||
@@ -58,6 +58,6 @@ runs:
|
||||
- name: "Run npm diff"
|
||||
id: diff
|
||||
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 }}"
|
||||
shell: bash
|
||||
|
||||
@@ -12,7 +12,7 @@ inputs:
|
||||
description: "NPM registry URL."
|
||||
required: false
|
||||
default: ${{ github.server_url }}/api/packages/${{ github.repository_owner }}/npm/
|
||||
authToken:
|
||||
apiKey:
|
||||
description: "Authentication token for the registry."
|
||||
required: true
|
||||
prerelease:
|
||||
@@ -43,7 +43,7 @@ runs:
|
||||
with:
|
||||
name: ${{ inputs.name }}
|
||||
registry: ${{ inputs.registry }}
|
||||
authToken: ${{ inputs.authToken }}
|
||||
apiKey: ${{ inputs.apiKey }}
|
||||
filter: ^${{ steps.base.outputs.baseVersion }}
|
||||
prerelease: ${{ inputs.prerelease }}
|
||||
- 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:
|
||||
name: ${{ inputs.name }}
|
||||
registry: ${{ inputs.registry }}
|
||||
authToken: ${{ inputs.authToken }}
|
||||
apiKey: ${{ inputs.apiKey }}
|
||||
filter: ^${{ steps.base.outputs.majorMinorPatchVersion }}
|
||||
prerelease: "false"
|
||||
- name: "Get the next version for the package."
|
||||
|
||||
@@ -20,7 +20,7 @@ inputs:
|
||||
description: "NPM registry URL."
|
||||
required: false
|
||||
default: ${{ github.server_url }}/api/packages/${{ github.repository_owner }}/npm/
|
||||
authToken:
|
||||
apiKey:
|
||||
description: "Authentication token for the registry."
|
||||
required: true
|
||||
outputs:
|
||||
@@ -32,5 +32,5 @@ runs:
|
||||
steps:
|
||||
- name: "Download the package."
|
||||
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
|
||||
|
||||
@@ -28,7 +28,7 @@ inputs:
|
||||
description: "NPM registry URL."
|
||||
required: false
|
||||
default: ${{ github.server_url }}/api/packages/${{ github.repository_owner }}/npm/
|
||||
authToken:
|
||||
apiKey:
|
||||
description: "Authentication token for the registry."
|
||||
required: true
|
||||
skipCompare:
|
||||
@@ -55,7 +55,7 @@ runs:
|
||||
name: ${{ inputs.name }}
|
||||
defaultVersion: ${{ inputs.defaultVersion }}
|
||||
registry: ${{ inputs.registry }}
|
||||
authToken: ${{ inputs.authToken }}
|
||||
apiKey: ${{ inputs.apiKey }}
|
||||
- name: "Pack with latest version for comparison"
|
||||
if: ${{ steps.npm.outputs.latestVersion && inputs.skipCompare == 'false' }}
|
||||
id: pack_comparison
|
||||
@@ -77,7 +77,7 @@ runs:
|
||||
rhsVersion: ${{ steps.npm.outputs.latestVersion }}
|
||||
workingDirectory: ${{ inputs.workingDirectory }}
|
||||
registry: ${{ inputs.registry }}
|
||||
authToken: ${{ inputs.authToken }}
|
||||
apiKey: ${{ inputs.apiKey }}
|
||||
failOnDifferences: "false"
|
||||
- name: "Pack with next version"
|
||||
if: ${{ !steps.npm.outputs.latestVersion || inputs.skipCompare == 'true' || steps.compare.outputs.hasDifferences == 'true' }}
|
||||
|
||||
@@ -37,7 +37,7 @@ runs:
|
||||
# Configure npm authentication for the registry (scoped to project)
|
||||
REGISTRY_PATH=$(echo "${{ inputs.registry }}" | sed -E 's|https?://||')
|
||||
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 }}"
|
||||
npm publish --location=project "$TGZ_PATH" --access ${{ inputs.access }}
|
||||
|
||||
@@ -8,7 +8,7 @@ inputs:
|
||||
description: "NPM registry URL."
|
||||
required: false
|
||||
default: ${{ github.server_url }}/api/packages/${{ github.repository_owner }}/npm/
|
||||
authToken:
|
||||
apiKey:
|
||||
description: "Authentication token for the registry."
|
||||
required: true
|
||||
prerelease:
|
||||
@@ -35,7 +35,7 @@ runs:
|
||||
with:
|
||||
name: ${{ inputs.name }}
|
||||
registry: ${{ inputs.registry }}
|
||||
authToken: ${{ inputs.authToken }}
|
||||
apiKey: ${{ inputs.apiKey }}
|
||||
prerelease: ${{ inputs.prerelease }}
|
||||
- name: "Parse query result."
|
||||
id: parse
|
||||
|
||||
@@ -8,7 +8,7 @@ inputs:
|
||||
description: "NPM registry URL."
|
||||
required: false
|
||||
default: ${{ github.server_url }}/api/packages/${{ github.repository_owner }}/npm/
|
||||
authToken:
|
||||
apiKey:
|
||||
description: "Authentication token for the registry."
|
||||
required: true
|
||||
prerelease:
|
||||
@@ -24,5 +24,5 @@ runs:
|
||||
steps:
|
||||
- name: "Query NPM registry for versions."
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user