Skip to content

Commit 4ce82c1

Browse files
committed
ci: make versioning deterministic and controllable
1 parent 44f4202 commit 4ce82c1

2 files changed

Lines changed: 1 addition & 12 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ jobs:
207207

208208
- name: Create release tag
209209
id: release_tag
210-
run: echo "tag=v$(cat VERSION.txt)-${GITHUB_RUN_NUMBER}" >> "$GITHUB_OUTPUT"
210+
run: echo "tag=$(cat VERSION)" >> "$GITHUB_OUTPUT"
211211

212212
- name: Publish GitHub Release
213213
uses: softprops/action-gh-release@v2

build.sh

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,6 @@
22

33
set -euo pipefail
44

5-
echo "Updating VERSION..."
6-
7-
TAG=$(git ls-remote --tags --sort="v:refname" https://github.com/pedroac/sprat-cli.git 2>/dev/null | awk '{print $2}' | sed 's|refs/tags/||' | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | tail -n 1)
8-
9-
if [ -z "$TAG" ]; then
10-
TAG=$(git rev-parse --short HEAD)
11-
fi
12-
13-
echo "$TAG" > VERSION
14-
echo "Version set to: $TAG"
15-
165
build_dir="build"
176

187
echo "Configuring..."

0 commit comments

Comments
 (0)