Skip to content

Commit

Permalink
Update CI
Browse files Browse the repository at this point in the history
  • Loading branch information
lucemans committed Dec 17, 2024
1 parent 93b7756 commit 188721b
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,13 @@ jobs:
run: |
if [[ ${{ github.ref }} =~ ^refs/tags/v[0-9]+\.[0-9]+\.[0-9]+.*$ ]]; then
echo "Release tag detected, using tag version: ${{ github.ref }}"
# remove version from Cargo.toml
sed -i '/version =/d' engine/Cargo.toml
echo "version = \"${{ github.ref }}\"" > engine/Cargo.toml
# update the version in Cargo.toml
sed -i "s/^version = .*/version = \"${{ github.ref }}\"/" engine/Cargo.toml
else
echo "No release tag detected, using version from Cargo.toml: ${{ github.ref }}"
version=$(grep -oP '(?<=version = ")[^"]+' engine/Cargo.toml)
# remove version from Cargo.toml
sed -i '/version =/d' engine/Cargo.toml
echo "version = \"${version}-alpha\"" > engine/Cargo.toml
# update the version in Cargo.toml
sed -i "s/^version = .*/version = \"${version}-alpha\"/" engine/Cargo.toml
fi
# 🔨 Build our static binary
Expand Down

0 comments on commit 188721b

Please sign in to comment.