Skip to content

Commit 1e7d642

Browse files
committed
chore: update changeset:publish:pre-release script to use dynamic NPM tag
- Modify the changeset:publish:pre-release script in package.json to include a dynamic NPM tag using the environment variable. - Update GitHub Actions workflow to pass the NPM tag as an environment variable for the publish step. Signed-off-by: Odin Thomas Rochmann <odin.rochmann@gmail.com>
1 parent b1cae01 commit 1e7d642

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

.github/workflows/next.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,11 @@ jobs:
4242
with:
4343
title: '🤖 Bip Bop - Fusion React Components Pre-Release'
4444
version: pnpm changeset:version
45-
publish: pnpm changeset:publish:pre-release --tag ${{ steps.tag.outputs.tag }}
45+
publish: pnpm changeset:publish:pre-release
4646
env:
4747
GITHUB_TOKEN: ${{ github.token }}
4848
NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
49+
NPM_TAG: ${{ steps.tag.outputs.tag }}
4950

5051
- name: convert Changeset PR to draft
5152
if: steps.changesets.outputs.published == 'false' && steps.changesets.outputs.pullRequestNumber

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"lerna:dedupe": "lernaupdate --dedupe",
3535
"changeset:version": "changeset version && pnpm install --lockfile-only",
3636
"changeset:publish": "pnpm changeset tag && pnpm publish -r --no-git-checks",
37-
"changeset:publish:pre-release": "pnpm publish -r --no-git-checks --report-summary"
37+
"changeset:publish:pre-release": "pnpm publish -r --no-git-checks --report-summary --tag ${NPM_TAG:-preview}"
3838
},
3939
"repository": {
4040
"type": "git",

0 commit comments

Comments
 (0)