Skip to content

Commit 7fb450a

Browse files
authored
ci: update release candidate workflow (#6624)
1 parent f4ded58 commit 7fb450a

File tree

1 file changed

+9
-13
lines changed

1 file changed

+9
-13
lines changed

.github/workflows/release_candidate.yml

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,15 @@ jobs:
4141

4242
- name: Publish release candidate
4343
run: |
44-
pkg_json_path=packages/react/package.json
45-
version=$(jq -r .version $pkg_json_path)
46-
echo "$( jq ".version = \"$(echo $version)-rc.$(git rev-parse --short HEAD)\"" $pkg_json_path )" > $pkg_json_path
44+
if [[ -f '.changeset/pre.json' ]]; then
45+
npx changeset pre exit
46+
npx changeset version --snapshot
47+
else
48+
pkg_json_path=packages/react/package.json
49+
version=$(jq -r .version $pkg_json_path)
50+
echo "$( jq ".version = \"$(echo $version)-rc.$(git rev-parse --short HEAD)\"" $pkg_json_path )" > $pkg_json_path
51+
fi
52+
4753
npx changeset publish --tag next
4854
env:
4955
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -62,13 +68,3 @@ jobs:
6268
description: package.version,
6369
target_url: `https://unpkg.com/${package.name}@${package.version}/`
6470
})
65-
66-
release-candidate-next-major:
67-
if: github.ref_name == 'changeset-release/next-major'
68-
name: Candidate (@next-major)
69-
uses: primer/.github/.github/workflows/[email protected]
70-
with:
71-
tag: next-major
72-
secrets:
73-
gh_token: ${{ secrets.GITHUB_TOKEN }}
74-
npm_token: ${{ secrets.NPM_AUTH_TOKEN_SHARED }}

0 commit comments

Comments
 (0)