Files
Viper_VSCode/.github/actions/cfs-npm-authenticate/action.yml
TermiNexus e9e4693333
Some checks failed
Run mypy_primer on push / Run mypy_primer on push (push) Has been cancelled
Validation / Typecheck (push) Has been cancelled
Validation / Style (push) Has been cancelled
Validation / Test macos-latest (push) Has been cancelled
Validation / Test ubuntu-latest (push) Has been cancelled
Validation / Test windows-latest (push) Has been cancelled
Validation / Build (push) Has been cancelled
Validation / Required (push) Has been cancelled
初始化上传
2026-07-24 17:08:39 +08:00

34 lines
1.4 KiB
YAML

name: Add auth token to .npmrc
on:
workflow_call:
inputs:
working-directory:
description: The directory whose .npmrc file should be modified
required: true
type: string
token:
description: The auth token to add to the .npmrc file
required: true
type: string
feed-url:
description: The URL of the Azure Artifacts feed to authenticate with
required: false
default: //devdiv.pkgs.visualstudio.com/DevDiv/_packaging/Pylance_PublicPackages
runs:
using: composite
steps:
- name: Generate .npmrc
shell: bash
run: |
echo "registry=https:${{ inputs.feed-url }}/npm/registry/" > ${{ inputs.working-directory }}/.npmrc
echo "" >> ${{ inputs.working-directory }}/.npmrc
echo "${{ inputs.feed-url }}/npm/registry/:username=github-actions" >> ${{ inputs.working-directory }}/.npmrc
echo "${{ inputs.feed-url }}/npm/registry/:_authToken=${{ inputs.token }}" >> ${{ inputs.working-directory }}/.npmrc
echo "${{ inputs.feed-url }}/npm/registry/:email=actions@github.com" >> ${{ inputs.working-directory }}/.npmrc
echo "${{ inputs.feed-url }}/npm:username=github-actions" >> ${{ inputs.working-directory }}/.npmrc
echo "${{ inputs.feed-url }}/npm:_authToken=${{ inputs.token }}" >> ${{ inputs.working-directory }}/.npmrc
echo "${{ inputs.feed-url }}/npm:email=actions@github.com" >> ${{ inputs.working-directory }}/.npmrc