File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -17,13 +17,28 @@ jobs:
17
17
- name : Setup
18
18
uses : ./.github/actions/setup
19
19
20
+ - name : Determine NPM tag
21
+ id : npm-tag
22
+ run : |
23
+ # Read the version from package.json
24
+ VERSION=$(node -p "require('./modules/@shopify/checkout-sheet-kit/package.json').version")
25
+
26
+ # Check if it's a "beta" or "rc" version
27
+ if [[ "$VERSION" == *"-beta"* ]] || [[ "$VERSION" == *"-rc"* ]]; then
28
+ echo "Version $VERSION is a prerelease, using 'next' tag"
29
+ echo "tag=next" >> $GITHUB_OUTPUT
30
+ else
31
+ echo "Version $VERSION is a stable release, using 'latest' tag"
32
+ echo "tag=latest" >> $GITHUB_OUTPUT
33
+ fi
34
+
20
35
- name : Prepare release
21
36
run : |
22
37
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
23
38
cp README.md modules/@shopify/checkout-sheet-kit
24
39
yarn module clean
25
40
yarn module build
26
41
cd modules/@shopify/checkout-sheet-kit
27
- npm publish --access public
42
+ npm publish --access public --tag ${{ steps.npm-tag.outputs.tag }}
28
43
env :
29
44
NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
You can’t perform that action at this time.
0 commit comments