Skip to content

Commit

Permalink
fix versioning
Browse files Browse the repository at this point in the history
changesets does not recognize yarn workspaces, so we need to run our own commands.
  • Loading branch information
mayank99 committed Dec 21, 2023
1 parent ccc5a8e commit 3bc9e7e
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .changeset/tall-bikes-relax.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@itwin/itwinui-layouts-react': patch
---

Fix dependency version.
10 changes: 6 additions & 4 deletions .github/workflows/changeset-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ jobs:

- run: yarn

- name: Use npm token
run: |
echo npmAuthToken: "$NODE_AUTH_TOKEN" >> ./.yarnrc.yml
env:
NODE_AUTH_TOKEN: ${{ secrets.NPMJS_PUBLISH_ITWIN }}

- name: Create release PR or publish to npm
uses: changesets/action@v1
with:
Expand All @@ -32,7 +38,3 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPMJS_PUBLISH_ITWIN }}
GIT_AUTHOR_NAME: github-actions[bot]
GIT_AUTHOR_EMAIL: github-actions[bot]@users.noreply.github.com
GIT_COMMITTER_NAME: github-actions[bot]
GIT_COMMITTER_EMAIL: github-actions[bot]@users.noreply.github.com
28 changes: 28 additions & 0 deletions .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@ npmRegistryServer: 'https://registry.yarnpkg.com'
npmScopes:
bentley:
npmRegistryServer: 'https://registry.yarnpkg.com'

plugins:
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
spec: '@yarnpkg/plugin-workspace-tools'
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
"prepare": "husky install",
"pre-commit": "lint-staged",
"build-docker": "yarn workspace @itwin/itwinui-layouts-demo build-docker",
"release": "yarn build && changeset publish"
"release": "yarn build && yarn publish",
"publish": "yarn workspaces foreach --no-private npm publish --tolerate-republish --access public"
},
"devDependencies": {
"@changesets/cli": "^2.26.1",
Expand Down

0 comments on commit 3bc9e7e

Please sign in to comment.