Add publish pipeline config (#425)
Moved build and test steps into a template file.
This commit is contained in:
Родитель
114bda51c2
Коммит
109f60ef14
|
@ -10,28 +10,4 @@ jobs:
|
|||
- job: main
|
||||
displayName: "Build and test"
|
||||
steps:
|
||||
- task: NodeTool@0
|
||||
inputs:
|
||||
versionSpec: "20.x"
|
||||
displayName: "Install Node.js"
|
||||
|
||||
- script: |
|
||||
npm install -g npm
|
||||
npm install
|
||||
displayName: "Install dependencies"
|
||||
|
||||
- script: |
|
||||
npm run build
|
||||
displayName: "Build"
|
||||
|
||||
- script: npm run test:ci
|
||||
displayName: Test
|
||||
|
||||
- script: npm run lint
|
||||
displayName: Lint
|
||||
|
||||
- script: npm run check-format
|
||||
displayName: Check formatting
|
||||
|
||||
- script: npm run validate-spec-coverage
|
||||
displayName: Validate OpenAPI specs mock API coverage
|
||||
- template: ./steps/build-test.yml
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
trigger: none
|
||||
pr: none
|
||||
|
||||
pool:
|
||||
vmImage: "ubuntu-latest"
|
||||
|
||||
steps:
|
||||
- template: ./steps/build-test.yml
|
||||
|
||||
- script: |
|
||||
echo "//registry.npmjs.org/:_authToken=$(azure-sdk-npm-token)" > ./.npmrc
|
||||
npm publish --access public
|
||||
displayName: "Publish to npm"
|
|
@ -0,0 +1,26 @@
|
|||
steps:
|
||||
- task: NodeTool@0
|
||||
inputs:
|
||||
versionSpec: "20.x"
|
||||
displayName: "Install Node.js"
|
||||
|
||||
- script: |
|
||||
npm install -g npm
|
||||
npm install
|
||||
displayName: "Install dependencies"
|
||||
|
||||
- script: |
|
||||
npm run build
|
||||
displayName: "Build"
|
||||
|
||||
- script: npm run test:ci
|
||||
displayName: Test
|
||||
|
||||
- script: npm run lint
|
||||
displayName: Lint
|
||||
|
||||
- script: npm run check-format
|
||||
displayName: Check formatting
|
||||
|
||||
- script: npm run validate-spec-coverage
|
||||
displayName: Validate OpenAPI specs mock API coverage
|
Загрузка…
Ссылка в новой задаче