Skip to content

Commit df40f57

Browse files
ci: use yarn flag --tolerate-republish (#4018)
* ci: use yarn flag `--tolerate-republish` * double verbose --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 9ea203f commit df40f57

3 files changed

Lines changed: 4 additions & 68 deletions

File tree

.ado/azure-pipelines.publish.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ extends:
7575
displayName: 'yarn buildci [test]'
7676
7777
- script: |
78+
yarn config set npmPublishAccess public
7879
yarn config set npmPublishRegistry "https://registry.npmjs.org"
7980
yarn config set npmAuthToken $(npmAuth)
8081
displayName: 'Configure yarn for npm publishing'
@@ -83,12 +84,12 @@ extends:
8384
- script: |
8485
# https://github.com/changesets/changesets/issues/432
8586
# We can't use `changeset publish` because it doesn't support workspaces, so we have to publish each package individually
86-
yarn workspaces foreach --all --topological --no-private \
87-
exec node $(Build.SourcesDirectory)/.github/scripts/publish-package-if-needed.mts
87+
yarn workspaces foreach -vv --all --topological --no-private npm publish --tolerate-republish
8888
displayName: 'Publish NPM Packages'
8989
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main'), not(${{ parameters.skipNpmPublish }}))
9090
9191
- script: |
92+
yarn config unset npmPublishAccess
9293
yarn config unset npmAuthToken
9394
yarn config unset npmPublishRegistry
9495
displayName: 'Cleanup yarn npm config'

.github/scripts/publish-package-if-needed.mts

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

.github/workflows/pr.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,8 +326,7 @@ jobs:
326326

327327
- name: Simulate publish
328328
run: |
329-
yarn workspaces foreach --all --topological --no-private \
330-
exec node $(pwd)/.github/scripts/publish-package-if-needed.mts --dry-run
329+
yarn workspaces foreach -vv --all --topological --no-private npm publish --tolerate-republish --dry-run
331330
332331
test-links:
333332
name: Test repo links

0 commit comments

Comments
 (0)