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 :
17+ NX_PARALLEL : 8
18+ NX_PREFER_TS_NODE : true
19+ NX_VERBOSE_LOGGING : true
720 - group : ' Github and NPM secrets'
821 - group : InfoSec-SecurityResults
922 - name : tags
@@ -39,6 +52,9 @@ extends:
3952 targetPath : $(System.DefaultWorkingDirectory)/packages
4053 artifactName : output
4154 steps :
55+ - checkout : self
56+ persistCredentials : true
57+
4258 # For multiline scripts, we want the whole task to fail if any line of the script fails.
4359 # ADO doesn't have bash configured this way by default. To fix we override the SHELLOPTS built-in variable.
4460 # https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html
@@ -57,15 +73,26 @@ extends:
5773 - script : yarn install --frozen-lockfile
5874 displayName : Install dependencies
5975
76+ - script : |
77+ yarn nx run-many -t build,test,lint,type-check -p ${{ parameters.projects }} -nxBail
78+ displayName: Verify publish Assets
79+
6080 - script : |
6181 git config user.name "Fluent UI Build"
6282 git config user.email "fluentui-internal@service.microsoft.com"
63- git remote set-url origin https://$(githubUser):$(githubPAT)@github.com/microsoft/fluentui-contrib.git
6483 displayName: Authenticate git for pushes
6584
6685 - script : |
67- yarn beachball publish -b origin/main --access public -y -n $(npmToken)
68- git reset --hard origin/main
69- env:
70- GITHUB_PAT: $(githubPAT)
71- displayName: Publish to NPM & bump versions
86+ yarn nx release --skip-publish -p ${{ parameters.projects }} --dry-run ${{ parameters.dry_run }}
87+ displayName: Bump versions and generate Changelogs
88+
89+ # NOTE: this will not use cache from previous steps as package.json file changed during version bump
90+ - script : |
91+ yarn nx run-many -t build -p ${{ parameters.projects }}
92+ displayName: Prepare publish Assets
93+
94+ # TODO: move this to separate job so in case of npm failure we can re-trigger until everything is successfully published
95+ - script : |
96+ yarn nx release publish -p ${{ parameters.projects }} --dry-run ${{ parameters.dry_run }}
97+ condition: succeeded()
98+ displayName: Publish to NPM
0 commit comments