Skip to content

Commit d46d7fe

Browse files
committed
ci: use nx release for publishing
1 parent 60659e7 commit d46d7fe

File tree

3 files changed

+36
-24
lines changed

3 files changed

+36
-24
lines changed

.github/workflows/ci-change.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,17 @@ jobs:
3131

3232
- run: yarn install --frozen-lockfile
3333

34+
- name: 'Check duplicates in yarn.lock'
35+
run: yarn run dedupe --list --fail
36+
3437
- name: 'Check duplicates in yarn.lock'
3538
run: yarn run dedupe --list --fail
3639

3740
- run: yarn check-dependencies
3841

42+
- name: 'Check version plans'
43+
run: yarn nx release plan:check
44+
3945
- name: Install Playwright Browsers
4046
run: npx playwright install --with-deps
4147

azure-pipelines.yml

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,16 @@
33
pr: none
44
trigger: 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+
616
variables:
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

Comments
 (0)