Skip to content

Commit 285cf26

Browse files
authored
Nightly Fix: Build on exact tag when QUALIFIER is empty (#721)
* Nightly Fix: Build on exact tag when QUALIFIER is empty * Disable CI and CodeQL workflow run on Nightly change
1 parent 0caa1c4 commit 285cf26

3 files changed

Lines changed: 9 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99
- '.github/workflows/markdown.yml'
1010
- '.github/markdownlint.json'
1111
- '.github/markdownlint.jsonc'
12+
- '.github/workflows/nightly.yml'
1213
pull_request:
1314
branches:
1415
- main
@@ -17,6 +18,7 @@ on:
1718
- '.github/workflows/markdown.yml'
1819
- '.github/markdownlint.json'
1920
- '.github/markdownlint.jsonc'
21+
- '.github/workflows/nightly.yml'
2022
workflow_dispatch:
2123
merge_group:
2224
release:

.github/workflows/codeql.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99
- '.github/workflows/markdown.yml'
1010
- '.github/markdownlint.json'
1111
- '.github/markdownlint.jsonc'
12+
- '.github/workflows/nightly.yml'
1213
push:
1314
branches:
1415
- main
@@ -17,6 +18,7 @@ on:
1718
- '.github/workflows/markdown.yml'
1819
- '.github/markdownlint.json'
1920
- '.github/markdownlint.jsonc'
21+
- '.github/workflows/nightly.yml'
2022

2123
permissions:
2224
contents: read

.github/workflows/nightly.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,11 @@ jobs:
5656
DESCRIBE=$(git describe --tags | grep -Eo 'v[0-9]+\.[0-9]+\.[0-9]+')
5757
QUALIFIER=$(git describe --tags | grep -Eo '[0-9]+\-g[0-9a-f]+$')
5858
yarn version -s --no-git-tag-version --new-version "${DESCRIBE#v}"
59-
yarn version --no-git-tag-version --prepatch --preid "${{ github.ref_name }}${QUALIFIER}"
59+
if [ -n "${QUALIFIER}" ]; then
60+
yarn version --no-git-tag-version --prepatch --preid "${{ github.ref_name }}${QUALIFIER}"
61+
else
62+
yarn version --no-git-tag-version --prepatch --preid "${{ github.ref_name }}"
63+
fi
6064
VERSION="$(jq -r ".version" < package.json)"
6165
sed -i "s/## Unreleased/## ${VERSION}/" CHANGELOG.md
6266
echo "Version is ${VERSION}"

0 commit comments

Comments
 (0)