We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 72208e2 commit 983003aCopy full SHA for 983003a
1 file changed
.github/workflows/jekyll-gh-pages.yml
@@ -45,7 +45,16 @@ jobs:
45
- name: Set version
46
id: version
47
run: |
48
- VERSION="1.0.${{ github.run_number }}"
+ # Version scheme: use MAJOR.MINOR from the repo `VERSION` file, and auto-increment PATCH via GitHub run number.
49
+ # Example: if `VERSION` contains `1.1.0`, the workflow produces `1.1.<run_number>`.
50
+ BASE_VERSION="$(tr -d '\r\n' < VERSION 2>/dev/null || true)"
51
+ if [[ ! "$BASE_VERSION" =~ ^([0-9]+)\.([0-9]+)\.([0-9]+)$ ]]; then
52
+ echo "ERROR: VERSION must be in SemVer format: MAJOR.MINOR.PATCH (example: 1.1.0). Got: '$BASE_VERSION'" >&2
53
+ exit 2
54
+ fi
55
+ MAJOR="${BASH_REMATCH[1]}"
56
+ MINOR="${BASH_REMATCH[2]}"
57
+ VERSION="${MAJOR}.${MINOR}.${{ github.run_number }}"
58
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
59
echo "$VERSION" > VERSION
60
0 commit comments