From 5e7df7ac972bc84f8b6bfd338eec9a16bc92e919 Mon Sep 17 00:00:00 2001 From: Kaz Nishimura Date: Tue, 14 Apr 2020 13:20:03 +0900 Subject: [PATCH] Add an 'azure-pipelines.yml' file --- azure-pipelines.yml | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 azure-pipelines.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 0000000..e4ba6c2 --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,39 @@ +# azure-pipelines.yml - configuration for Azure Pipelines +# Copyright (C) 2020 Kaz Nishimura +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice and +# this notice are preserved. This file is offered as-is, without any warranty. +--- +trigger: + - master + - release/* + - feature/* +stages: + - stage: Default + jobs: + - job: Build + pool: + vmImage: ubuntu-latest + steps: + - task: NodeTool@0 + - bash: | + npm test + displayName: Test + - task: PublishTestResults@2 + condition: succeededOrFailed() + - stage: Release + dependsOn: Default + condition: + and(succeeded(), + startsWith(variables['Build.SourceBranch'], 'refs/heads/release/')) + jobs: + - job: Upload + pool: + vmImage: ubuntu-latest + steps: + - task: NodeTool@0 + - task: Npm@1 + inputs: + command: publish + publishEndpoint: npmjs