-
Notifications
You must be signed in to change notification settings - Fork 35
/
azure-pipelines.yml
71 lines (63 loc) · 2.59 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# Release pipeline
pr: none
trigger: none
variables:
- group: 'Github and NPM secrets'
- group: InfoSec-SecurityResults
- name: tags
value: production,externalfacing
resources:
repositories:
- repository: 1esPipelines
type: git
name: 1ESPipelineTemplates/1ESPipelineTemplates
ref: refs/tags/release
extends:
template: v1/1ES.Official.PipelineTemplate.yml@1esPipelines
parameters:
pool:
name: Azure-Pipelines-1ESPT-ExDShared
image: windows-latest
os: windows # We need windows because compliance task only run on windows.
stages:
- stage: main
jobs:
- job: Release
pool:
name: '1ES-Host-Ubuntu'
image: '1ES-PT-Ubuntu-20.04'
os: linux
workspace:
clean: all
templateContext:
outputs:
- output: pipelineArtifact
targetPath: $(System.DefaultWorkingDirectory)/packages
artifactName: output
steps:
# For multiline scripts, we want the whole task to fail if any line of the script fails.
# ADO doesn't have bash configured this way by default. To fix we override the SHELLOPTS built-in variable.
# https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html
# The options below include ADO defaults (braceexpand:hashall:interactive-comments) plus
# errexit:errtrace for better error behavior.
- script: |
echo "##vso[task.setvariable variable=shellopts]braceexpand:hashall:interactive-comments:errexit:errtrace"
displayName: Force exit on error (bash)
- task: NodeTool@0
inputs:
versionSpec: '20.x'
checkLatest: true
displayName: 'Install Node.js'
- script: yarn install --frozen-lockfile
displayName: Install dependencies
- script: |
git config user.name "Fluent UI Build"
git config user.email "[email protected]"
git remote set-url origin https://$(githubUser):$(githubPAT)@github.com/microsoft/fluentui-contrib.git
displayName: Authenticate git for pushes
- script: |
yarn beachball publish -b origin/main --access public -y -n $(npmToken)
git reset --hard origin/main
env:
GITHUB_PAT: $(githubPAT)
displayName: Publish to NPM & bump versions