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:
1717 - name : Setup
1818 uses : ./.github/actions/setup
1919
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+
2035 - name : Prepare release
2136 run : |
2237 echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
2338 cp README.md modules/@shopify/checkout-sheet-kit
2439 yarn module clean
2540 yarn module build
2641 cd modules/@shopify/checkout-sheet-kit
27- npm publish --access public
42+ npm publish --access public --tag ${{ steps.npm-tag.outputs.tag }}
2843 env :
2944 NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
You can’t perform that action at this time.
0 commit comments