diff --git a/azure-pipelines-steps-node.yml b/azure-pipelines-steps-node.yml index 331b16568..467243cc8 100644 --- a/azure-pipelines-steps-node.yml +++ b/azure-pipelines-steps-node.yml @@ -12,20 +12,37 @@ steps: inputs: workingFile: .npmrc -- script: npm ci +- task: Npm@1 + inputs: + command: ci + customRegistry: useNpmrc + workingDir: node displayName: (task-lib) npm ci - workingDirectory: node -- script: npm test - workingDirectory: node +- task: Npm@1 + inputs: + command: custom + customCommand: test + customRegistry: useNpmrc + workingDir: node displayName: (task-lib) npm test # Only on Linux. For CI runs on master, automatically publish packages - ${{ if eq(parameters.os, 'Linux') }}: + - task: Npm@1 + inputs: + command: publish + verbose: true + customRegistry: useNpmrc + workingDir: node/_build + publishRegistry: 'useFeed' + publishFeed: 'c86767d8-af79-4303-a7e6-21da0ba435e2/2442ccb9-e127-4ec5-99e5-28dd29f92057' + displayName: (task-lib) Publish the package to Azure DevOps Feed + - bash: | echo //registry.npmjs.org/:_authToken=\${NPM_TOKEN} > .npmrc npm publish || true # Ignore publish failures, usually will happen because package already exists - displayName: (task-lib) npm publish + displayName: (task-lib) Publish the package to npm workingDirectory: node/_build condition: and(succeeded(), in(variables['build.reason'], 'IndividualCI', 'BatchedCI', 'Manual'), in(variables['build.sourcebranch'], 'refs/heads/master')) env: diff --git a/node/package-lock.json b/node/package-lock.json index 01c3085b1..877121605 100644 --- a/node/package-lock.json +++ b/node/package-lock.json @@ -1,6 +1,6 @@ { "name": "azure-pipelines-task-lib", - "version": "4.17.3", + "version": "0.999.999", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/node/package.json b/node/package.json index 3073e290d..d62d14e54 100644 --- a/node/package.json +++ b/node/package.json @@ -1,6 +1,6 @@ { "name": "azure-pipelines-task-lib", - "version": "4.17.3", + "version": "0.999.999", "description": "Azure Pipelines Task SDK", "main": "./task.js", "typings": "./task.d.ts",