Workflow: set current tag to latest by default (#797)

pull/799/head
viktorxda 2023-05-15 20:18:54 +02:00 committed by GitHub
parent ee738a5e30
commit d009aa4a24
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 20 deletions

View File

@ -74,17 +74,10 @@ jobs:
- name: Determine toolchain name and can we skip build - name: Determine toolchain name and can we skip build
run: | run: |
HEAD_TAG=$(git tag --points-at HEAD)
GIT_HASH=$(git rev-parse --short $GITHUB_SHA) GIT_HASH=$(git rev-parse --short $GITHUB_SHA)
if [ -z "$HEAD_TAG" ]; then RELEASE_NAME="Development Build"
TAG_NAME="latest" TAG_NAME="latest"
RELEASE_NAME="Development Build" PRERELEASE=true
PRERELEASE=true
else
TAG_NAME=${{ github.ref }}
RELEASE_NAME="Release ${{ github.ref }}"
PRERELEASE=false
fi
echo "GIT_HASH=$GIT_HASH" >> $GITHUB_ENV echo "GIT_HASH=$GIT_HASH" >> $GITHUB_ENV
echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV
echo "RELEASE_NAME=$RELEASE_NAME" >> $GITHUB_ENV echo "RELEASE_NAME=$RELEASE_NAME" >> $GITHUB_ENV
@ -357,18 +350,11 @@ jobs:
- name: Prepare buildroot - name: Prepare buildroot
run: | run: |
HEAD_TAG=$(git tag --points-at HEAD)
GIT_HASH=$(git rev-parse --short $GITHUB_SHA) GIT_HASH=$(git rev-parse --short $GITHUB_SHA)
BRANCH=$(echo $GITHUB_REF | cut -d'/' -f 3) BRANCH=$(echo $GITHUB_REF | cut -d'/' -f 3)
if [ -z "$HEAD_TAG" ]; then RELEASE_NAME="Development Build"
TAG_NAME="latest" TAG_NAME="latest"
RELEASE_NAME="Development Build" PRERELEASE=true
PRERELEASE=true
else
TAG_NAME=${{ github.ref }}
RELEASE_NAME="Release ${{ github.ref }}"
PRERELEASE=false
fi
echo "GIT_HASH=$GIT_HASH" >> $GITHUB_ENV echo "GIT_HASH=$GIT_HASH" >> $GITHUB_ENV
echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV
echo "RELEASE_NAME=$RELEASE_NAME" >> $GITHUB_ENV echo "RELEASE_NAME=$RELEASE_NAME" >> $GITHUB_ENV