Skip to content

Commit be196ce

Browse files
committed
ci: conditionally publish packages with beta or latest tag
1 parent 92e6f04 commit be196ce

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

.github/workflows/release.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,16 @@ jobs:
4444
- name: Update NPM
4545
run: npm install -g npm@latest
4646

47+
- name: Determine NPM tag
48+
run: |
49+
if [[ "${{ github.ref_name }}" == *"beta"* ]]; then
50+
echo "NPM_TAG=beta" >> $GITHUB_ENV
51+
else
52+
echo "NPM_TAG=latest" >> $GITHUB_ENV
53+
fi
54+
4755
- name: Publish other packages besides create-vuetify
48-
run: pnpm --filter "!create-vuetify" -r publish --tag latest --access public --no-git-checks
56+
run: pnpm --filter "!create-vuetify" -r publish --tag ${{ env.NPM_TAG }} --access public --no-git-checks
4957

50-
- name: Publish create-vuetify with beta
51-
run: pnpm --filter "create-vuetify" publish --tag latest --access public --no-git-checks
58+
- name: Publish create-vuetify
59+
run: pnpm --filter "create-vuetify" publish --tag ${{ env.NPM_TAG }} --access public --no-git-checks

0 commit comments

Comments
 (0)