Skip to content

Commit e437a88

Browse files
committed
feat: Let’s show the version tag in prod
This will show the versions from the latest tag that shows up in the prod branch.
1 parent a8c7859 commit e437a88

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

.github/workflows/deploy-prod.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,13 @@ jobs:
3131
run: pnpm test
3232
- name: Run lint
3333
run: pnpm lint
34+
- name: Determine version tag for build
35+
run: |
36+
VERSION_TAG=$(git tag --points-at HEAD | grep -E '^v?[0-9]+\.[0-9]+\.[0-9]+' | sort -V | tail -n1)
37+
if [ -z "$VERSION_TAG" ]; then
38+
VERSION_TAG="v0.0.0+${GITHUB_SHA:0:7}"
39+
fi
40+
echo "VITE_STUDIO_VERSION=$VERSION_TAG" >> $GITHUB_ENV
3441
- name: Build prod
3542
run: pnpm build:prod
3643
- name: Deploy to prod

0 commit comments

Comments
 (0)