Skip to content

Commit 323df52

Browse files
committed
fix(ci): resolve workspace refs during changeset publish
1 parent 5297ee8 commit 323df52

2 files changed

Lines changed: 10 additions & 4 deletions

File tree

.github/workflows/release.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,17 @@ jobs:
2424
with:
2525
restore-turbo-cache: 'false' # in release workflow, build from scratch
2626

27+
- name: Setup npmrc
28+
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc
29+
30+
- name: Build
31+
run: yarn build
32+
2733
- name: Create Release Pull Request or Publish to NPM
2834
uses: changesets/action@e9cc34b540dd3ad1b030c57fd97269e8f6ad905a # v1.4.9
2935
with:
30-
version: yarn version-packages
31-
publish: yarn publish-packages
36+
version: yarn ci:version
37+
publish: yarn ci:publish
3238
commit: 'chore(release): version packages'
3339
title: 'chore(release): version packages'
3440
env:

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
"build": "turbo run build",
1414
"dev": "yarn workspaces foreach -Api run dev",
1515
"release": "release-it --config packages/react-native-brownfield/.release-it.json",
16-
"version-packages": "changeset version && yarn install --no-immutable",
17-
"publish-packages": "turbo run build lint && changeset version && changeset publish",
16+
"ci:version": "changeset version && yarn install --no-immutable",
17+
"ci:publish": "for dir in packages/*; do (cd \"$dir\" && yarn npm publish || true); done && changeset tag",
1818
"brownfield:plugin:publish:local": "bash ./gradle-plugins/publish-to-maven-local.sh",
1919
"build:brownfield": "turbo run build:brownfield",
2020
"build:docs": "turbo run build:docs",

0 commit comments

Comments
 (0)