forked from microsoft/fluentui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.release.yml
107 lines (88 loc) · 3.54 KB
/
azure-pipelines.release.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
pr: none
trigger: none
variables:
- group: 'Github and NPM secrets'
pool:
vmImage: 'Ubuntu 16.04'
steps:
- task: NodeTool@0
inputs:
versionSpec: '10.x'
displayName: 'Install Node.js'
- script: |
git config user.name "UI Fabric Build"
git config user.email "[email protected]"
git remote set-url origin https://$(githubUser):$(githubPAT)@github.com/OfficeDev/office-ui-fabric-react.git
displayName: Authenticate git for pushes
- script: |
node common/scripts/install-run-rush.js install --bypass-policy
displayName: rush install
- script: |
npm run generate-version-files
displayName: npm run generate-version-files
- script: |
node common/scripts/install-run-rush.js build --production --verbose
displayName: rush build (Create production build)
- script: |
echo Making $(Build.ArtifactStagingDirectory)/api &&
mkdir -p $(Build.ArtifactStagingDirectory)/api &&
cp packages/*/dist/*.api.json $(Build.ArtifactStagingDirectory)/api
displayName: Copy api.json files to artifact staging directory
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: $(Build.ArtifactStagingDirectory)/api
artifactName: 'api-json'
publishLocation: 'Container'
displayName: 'Publish Artifact: api.json'
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: apps/fabric-website/dist
artifactName: 'fabric-website'
publishLocation: 'Container'
displayName: 'Publish Artifact: Fabric Website'
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: apps/fabric-website/index.html
artifactName: 'fabric-website-index'
publishLocation: 'Container'
displayName: 'Publish Artifact: Fabric Website index.html'
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: packages/office-ui-fabric-react/dist
artifactName: 'fabric'
publishLocation: 'Container'
displayName: 'Publish Artifact: Fabric'
- script: |
node ./common/scripts/install-run-rush.js publish -a -p -b master -n $(npmToken) --add-commit-details --set-access-level public
displayName: 'Publish Change Requests and Bump Versions'
- script: |
node scripts/updateReleaseNotes.js --token=$(githubPAT) --apply --debug
displayName: 'Update github release notes'
- script: |
oufrVersion=$(node -p -e "require('./packages/office-ui-fabric-react/package.json').version") &&
echo "OUFR Version: $oufrVersion" &&
echo $oufrVersion > oufr-version.txt &&
echo "##vso[task.setvariable variable=oufrVersion;]$oufrVersion"
displayName: 'Set OUFR Version Task Variable'
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: ./oufr-version.txt
artifactName: 'oufr-version'
publishLocation: 'Container'
displayName: 'Publish Artifact: oufr-version.txt'
- script: |
npm run create-public-flight-config -- --baseCDNUrl https://fabricweb.azureedge.net/fabric-website/$(Build.BuildNumber)/
workingDirectory: apps/fabric-website
displayName: 'Generate Fabric Website Flight Manifest Files'
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: apps/fabric-website/flights
artifactName: 'fabric-website-manifests'
publishLocation: 'Container'
displayName: 'Publish Artifact: Website manifests'
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: apps/fabric-website-resources/dist
artifactName: 'fabric-website-resources'
publishLocation: 'Container'
displayName: 'Publish Artifact: Fabric Website Resources'