Skip to content

Commit

Permalink
update release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
chasegiunta committed Dec 25, 2024
1 parent 2224e40 commit 12d8264
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,14 @@ jobs:

- name: Set version from release tag
run: |
VERSION=${GITHUB_REF#refs/tags/v}
# Extract version from ref, removing refs/tags/ and optional v prefix
VERSION=$(echo ${GITHUB_REF#refs/tags/} | sed 's/^v//')
echo "Version: $VERSION"
# Validate semver format
if [[ ! $VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "Error: Invalid version format. Expected semver (e.g. 1.0.0)"
exit 1
fi
bun x json -I -f package.json -e "this.version='${VERSION}'"
- name: Build project
Expand Down

0 comments on commit 12d8264

Please sign in to comment.