diff --git a/azure-pipelines-steps-node.yml b/azure-pipelines-steps-node.yml index c5327ef0d..be23483d1 100644 --- a/azure-pipelines-steps-node.yml +++ b/azure-pipelines-steps-node.yml @@ -12,23 +12,29 @@ steps: inputs: workingFile: .npmrc -- script: npm ci +- task: Npm@1 + inputs: + command: ci + customRegistry: useNpmrc displayName: (task-lib) npm ci - workingDirectory: node -- script: npm test - workingDirectory: node +- task: Npm@1 + inputs: + command: test + customRegistry: useNpmrc displayName: (task-lib) npm test # Only on Linux. For CI runs on master, automatically publish packages - ${{ if eq(parameters.os, 'Linux') }}: - - bash: | - cp -f ../.npmrc .npmrc - npm publish || true # Ignore publish failures, usually will happen because package already exists - rm -f .npmrc + - 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 - workingDirectory: node/_build - condition: and(succeeded(), in(variables['build.reason'], 'IndividualCI', 'BatchedCI', 'Manual'), in(variables['build.sourcebranch'], 'refs/heads/master')) - bash: | echo //registry.npmjs.org/:_authToken=\${NPM_TOKEN} > .npmrc 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",