forked from mui/material-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
95 lines (83 loc) · 2.9 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
trigger:
branches:
include:
- '*'
exclude:
- l10n
- dependabot/*
pool:
vmImage: 'ubuntu-latest'
steps:
- task: NodeTool@0
inputs:
versionSpec: '10.x'
displayName: 'Install Node.js'
- script: |
yarn install
displayName: 'install dependencies'
- script: |
yarn lerna run --ignore @material-ui/icons --parallel --scope "@material-ui/*" build
displayName: 'build @material-ui packages'
- script: |
cd packages/material-ui/build
npm version 0.0.0-canary.$(Build.SourceVersion) --no-git-tag-version
npm pack
mv material-ui-core-0.0.0-canary.$(Build.SourceVersion).tgz ../../../material-ui-core.tgz
displayName: 'create @material-ui/core canary distributable'
- task: S3Upload@1
inputs:
regionName: 'eu-central-1'
bucketName: 'eps1lon-material-ui'
globExpressions: '*.tgz'
targetFolder: 'artifacts/$(Build.SourceBranchName)/$(Build.SourceVersion)'
filesAcl: 'public-read'
displayName: "Upload distributables to S3"
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
env:
AWS_ACCESS_KEY_ID: $(AWS_ACCESS_KEY_ID)
AWS_SECRET_ACCESS_KEY: $(AWS_SECRET_ACCESS_KEY)
- task: PublishPipelineArtifact@0
inputs:
pathtoPublish: '$(Build.ArtifactStagingDirectory)'
artifactName: 'canaries'
targetPath: 'material-ui-core.tgz'
- script: |
yarn docs:build
displayName: 'build docs'
- script: |
yarn size:snapshot
displayName: 'create a size snapshot'
- task: AmazonWebServices.aws-vsts-tools.S3Upload.S3Upload@1
displayName: 'persist size snapshot'
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
inputs:
awsCredentials: 's3 artifacts'
regionName: 'eu-central-1'
bucketName: 'eps1lon-material-ui'
sourceFolder: '$(System.DefaultWorkingDirectory)'
globExpressions: 'size-snapshot.json'
targetFolder: 'artifacts/$(Build.SourceBranchName)/$(Build.SourceVersion)/'
filesAcl: 'public-read'
contentType: application/json
logRequest: true
logResponse: true
- task: AmazonWebServices.aws-vsts-tools.S3Upload.S3Upload@1
displayName: 'symlink size-snapshot to latest'
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
inputs:
awsCredentials: 's3 artifacts'
regionName: 'eu-central-1'
bucketName: 'eps1lon-material-ui'
sourceFolder: '$(System.DefaultWorkingDirectory)'
globExpressions: 'size-snapshot.json'
targetFolder: 'artifacts/$(Build.SourceBranchName)/latest/'
filesAcl: 'public-read'
contentType: application/json
logRequest: true
logResponse: true
- script: |
yarn danger ci
displayName: 'run danger on PRs'
condition: and(succeeded(), eq(variables['Build.Reason'], 'PullRequest'))
env:
DANGER_GITHUB_API_TOKEN: $(GITHUB_API_TOKEN)