@paybyrd/card-collect
Version:
Paybyrd's tool to aid in the creation of credit card info collect forms
70 lines (63 loc) • 1.47 kB
YAML
# 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:
tags:
include:
- '*'
branches:
include:
- release/*
- hotfix/*
pr:
branches:
include:
- master
- main
pool:
vmImage: 'ubuntu-latest'
resources:
repositories:
- repository: templates
type: git
name: Gateway/paybyrd-deployment
ref: refs/tags/3.3.2
variables:
- template: variables.yml
stages:
- template: versioning/prepare.yml@templates
- stage: BuildStage
jobs:
- job: BuildJob
steps:
- task: replacetokens@5
name: ReplaceFile
inputs:
rootDirectory: '.'
targetFiles: '.npmrc'
encoding: 'auto'
tokenPattern: 'default'
writeBOM: true
actionOnMissing: fail
keepToken: false
actionOnNoFiles: fail
enableTransforms: false
useLegacyPattern: false
enableTelemetry: true
- bash: |
sed -i "s/\"version\": \"1.0.0\",/\"version\": \"$VERSION\",/" package.json
env:
VERSION: $(Build.BuildNumber)
name: UpdateVersion
- bash: |
npm install
name: Install
- bash: |
npm run build
name: Build
- bash: |
npm publish --access public
name: Publish
env:
VERSION: $(Build.Number)