workflow: update source checkout step and add tag creation logic in build script
This commit is contained in:
parent
25581cbb35
commit
cd9d8771c2
|
|
@ -56,13 +56,26 @@ jobs:
|
||||||
which
|
which
|
||||||
dnf clean all
|
dnf clean all
|
||||||
|
|
||||||
- name: Checkout source at release tag
|
- name: Checkout source
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
ref: ${{ env.TAG_NAME }}
|
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Create tag if it does not exist
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
set -euxo pipefail
|
||||||
|
git config --global --add safe.directory "${GITHUB_WORKSPACE:-/__w/llama.cpp/llama.cpp}"
|
||||||
|
if git rev-parse "refs/tags/${TAG_NAME}" >/dev/null 2>&1; then
|
||||||
|
echo "Tag ${TAG_NAME} already exists, checking out."
|
||||||
|
git checkout "${TAG_NAME}"
|
||||||
|
else
|
||||||
|
echo "Tag ${TAG_NAME} does not exist, creating it on HEAD."
|
||||||
|
git tag "${TAG_NAME}"
|
||||||
|
git push origin "refs/tags/${TAG_NAME}"
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Show build environment
|
- name: Show build environment
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue