33pr : none
44trigger : none
55
6+ parameters :
7+ - name : dry_run
8+ displayName : Dry run mode
9+ type : boolean
10+ default : true
11+ - name : projects # Projects to include within release. (comma/space delimited project names and/or patterns). See
12+ displayName : Projects to release (defaults to all)
13+ type : string
14+ default : ' '
15+
616variables :
717 - name : NX_PARALLEL
818 value : 8
@@ -45,6 +55,9 @@ extends:
4555 targetPath : $(System.DefaultWorkingDirectory)/packages
4656 artifactName : output
4757 steps :
58+ - checkout : self
59+ persistCredentials : true
60+
4861 # For multiline scripts, we want the whole task to fail if any line of the script fails.
4962 # ADO doesn't have bash configured this way by default. To fix we override the SHELLOPTS built-in variable.
5063 # https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html
@@ -63,15 +76,26 @@ extends:
6376 - script : yarn install --frozen-lockfile
6477 displayName : Install dependencies
6578
79+ - script : |
80+ yarn nx run-many -t build,test,lint,type-check -p ${{ parameters.projects }} -nxBail
81+ displayName: Verify publish Assets
82+
6683 - script : |
6784 git config user.name "Fluent UI Build"
6885 git config user.email "fluentui-internal@service.microsoft.com"
69- git remote set-url origin https://$(githubUser):$(githubPAT)@github.com/microsoft/fluentui-contrib.git
7086 displayName: Authenticate git for pushes
7187
7288 - script : |
73- yarn beachball publish -b origin/main --access public -y -n $(npmToken)
74- git reset --hard origin/main
75- env:
76- GITHUB_PAT: $(githubPAT)
77- displayName: Publish to NPM & bump versions
89+ yarn nx release --skip-publish -p ${{ parameters.projects }} --dry-run ${{ parameters.dry_run }}
90+ displayName: Bump versions and generate Changelogs
91+
92+ # NOTE: this will not use cache from previous steps as package.json file changed during version bump
93+ - script : |
94+ yarn nx run-many -t build -p ${{ parameters.projects }}
95+ displayName: Prepare publish Assets
96+
97+ # TODO: move this to separate job so in case of npm failure we can re-trigger until everything is successfully published
98+ - script : |
99+ yarn nx release publish -p ${{ parameters.projects }} --dry-run ${{ parameters.dry_run }}
100+ condition: succeeded()
101+ displayName: Publish to NPM
0 commit comments