diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 00000000..7a856f49 --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,21 @@ +# Node.js +# Build a general Node.js project with npm. +# Add steps that analyze code, save build artifacts, deploy, and more: +# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript + +trigger: +- main + +pool: + vmImage: ubuntu-latest + +steps: +- task: NodeTool@0 + inputs: + versionSpec: '20.x' + displayName: 'Install Node.js' + +- script: | + npm install + npm run build + displayName: 'npm install and build' diff --git a/npm.yml b/npm.yml new file mode 100644 index 00000000..1fa12736 --- /dev/null +++ b/npm.yml @@ -0,0 +1,43 @@ +trigger: +- none + +pool: + vmImage: 'ubuntu-latest' + +steps: +- task: UseNode@1 + inputs: + version: '16.X' + displayName: 'Install Node.js' + + +- script: | + npm install + displayName: 'npm install' + +- script: | + npm run build + displayName: 'npm build' +- task: CopyFiles@2 + inputs: + sourceFolder: '$(Build.SourcesDirectory)' + contents: | + src/* + public/* + targetFolder: '$(Build.ArtifactStagingDirectory)' + displayName: 'Copy project files' + +- task: PublishPipelineArtifact@1 + inputs: + artifactName: e2e-server + targetPath: '$(Build.ArtifactStagingDirectory)' + publishLocation: 'pipeline' + displayName: 'Publish npm artifact' + + +- task: Npm@1 + inputs: + command: 'publish' + workingDir: '$(Build.Repository.LocalPath)' + publishRegistry: 'useFeed' + publishFeed: 'NPM test/holi' \ No newline at end of file diff --git a/package.json b/package.json index c9366e48..7b48b753 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "js-e2e-express-server", - "version": "1.0.0", + "version": "1.1.0", "description": "JavaScript server written with Express.js", "main": "index.js", "directories": {