Skip to content

Commit e79ff2e

Browse files
committed
feat(build): update version tagging for main and cooker branches
1 parent 9d00a22 commit e79ff2e

File tree

2 files changed

+18
-12
lines changed

2 files changed

+18
-12
lines changed

.github/workflows/build_components.yml

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -672,28 +672,34 @@ jobs:
672672
cat "$RELEASE_BODY_FILE" >> $GITHUB_OUTPUT
673673
echo "EOF" >> $GITHUB_OUTPUT
674674
675-
- name: Set Make Latest
676-
run: |
677-
if [[ "${{ github.ref }}" == "refs/heads/main" ]]; then
678-
MAKE_LATEST=true
679-
else
680-
MAKE_LATEST=false
681-
fi
682-
echo "MAKE_LATEST=$MAKE_LATEST" >> $GITHUB_ENV
683-
684675
- name: Generate Version Tag
685676
id: version-tag
686677
run: |
687678
# Get the current date and time in GMT
688679
CURRENT_DATE=$(date -u +"%Y%m%d-%H%M")
689-
# Check if the branch is main or not
680+
681+
# Default: not latest
682+
MAKE_LATEST=false
683+
684+
# Branch-based tagging: main -> main-..., everything else -> cooker-...
690685
if [[ "${GITHUB_REF}" == "refs/heads/main" ]]; then
691686
TAG="main-${CURRENT_DATE}"
687+
MAKE_LATEST=true
692688
else
693689
TAG="cooker-${CURRENT_DATE}"
690+
MAKE_LATEST=false
694691
fi
692+
693+
# Set target repo name (repo part of owner/repo)
694+
REPO_NAME="${GITHUB_REPOSITORY#*/}"
695+
696+
# Export values
695697
echo "TAG=$TAG" >> $GITHUB_ENV
698+
echo "MAKE_LATEST=$MAKE_LATEST" >> $GITHUB_ENV
699+
echo "REPO_NAME=$REPO_NAME" >> $GITHUB_ENV
700+
696701
echo "TAG=$TAG" >> $GITHUB_OUTPUT
702+
echo "MAKE_LATEST=$MAKE_LATEST" >> $GITHUB_OUTPUT
697703
698704
- name: Publish release
699705
uses: ncipollo/release-action@v1

automation-tools/alchemist/desired_versions.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -549,8 +549,8 @@ export DESIRED_QT5_RUNTIME_VERSION="5.15-25.08"
549549
# ------------------------------------------------------------------
550550

551551
if [[ "${GITHUB_REF_NAME:-}" != "main" ]]; then
552-
# Non‑main branches use the “cooker‑latest” build tag
553-
export FRAMEWORK_DESIRED_VERSION="cooker-latest on $(date +%Y-%m-%d)"
552+
# Non‑main branches use the “latest-cooker” build tag
553+
export FRAMEWORK_DESIRED_VERSION="latest-cooker on $(date +%Y-%m-%d)"
554554
else
555555
# Main branch uses the “main‑latest” build tag
556556
export FRAMEWORK_DESIRED_VERSION="main-latest on $(date +%Y-%m-%d)"

0 commit comments

Comments
 (0)