forked from microsoft/fluentui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.release-vnext-nightly.yml
66 lines (53 loc) · 1.85 KB
/
azure-pipelines.release-vnext-nightly.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
pr: none
trigger: none
# Customize build number to include major version
# Example: v9_20201022.1
name: 'v9_nightly_$(Date:yyyyMMdd)$(Rev:.r)'
variables:
- group: 'Github and NPM secrets'
- template: .devops/templates/variables.yml
- name: release.vnext # Used to scope beachball to release only vnext packages
value: true
pool: '1ES-Host-Ubuntu'
schedules:
# Triggers the nightly release
# minute 0, hour 4 in UTC (5am in UTC+1), any day of month, any month, days 1-5 of week (M-F)
# https://docs.microsoft.com/en-us/azure/devops/pipelines/build/triggers?tabs=yaml&view=azure-devops#supported-cron-syntax
- cron: '0 4 * * 1-5'
displayName: 'Daily release (M-F at 5am UTC+1)'
branches:
include:
- master
workspace:
clean: all
steps:
- template: .devops/templates/tools.yml
- task: Bash@3
inputs:
filePath: yarn-ci.sh
displayName: yarn
# Bumps all v9 packages to a x.x.x-nightly.commitSha version and checks in change files
- script: |
commitSha=$(git log -n 1 --pretty=format:"%h")
date=$(date +"%Y%m%d")
yarn nx workspace-generator version-bump --all --bumpType nightly --prereleaseTag "nightly${commitSha}${date}"
git add .
git commit -m "bump nightly versions"
yarn change --type prerelease --message "Release nightly v9"
displayName: 'Bump and commit nightly versions'
- script: |
yarn run:published build --production --no-cache
displayName: yarn build
- script: |
yarn run:published test
displayName: yarn test
- script: |
yarn run:published lint
displayName: yarn lint
- script: |
yarn publish:beachball -n $(npmToken) --no-push --tag nightly
git reset --hard origin/master
displayName: Publish changes and bump versions
- template: .devops/templates/cleanup.yml
parameters:
checkForModifiedFiles: false