mirror of
https://github.com/super-linter/super-linter.git
synced 2024-11-22 14:10:56 -05:00
Assign RELEASE_VERSION before using it (#3413)
This commit is contained in:
parent
bb2d833b08
commit
4b6635f63b
1 changed files with 11 additions and 5 deletions
16
.github/workflows/deploy-release.yml
vendored
16
.github/workflows/deploy-release.yml
vendored
|
@ -45,16 +45,22 @@ jobs:
|
|||
- name: Get current release identifier
|
||||
# shellcheck disable=SC2062
|
||||
run: |
|
||||
echo "RELEASE_VERSION=$(echo ${{ github.event.release.name }} \
|
||||
| grep -E -o "v[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+")" \
|
||||
>> "${GITHUB_ENV}"
|
||||
RELESE_VERSION="$(echo ${{ github.event.release.name }} \
|
||||
| grep -E -o "v[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+")"
|
||||
|
||||
if [ -z "${RELEASE_VERSION}" ]; then
|
||||
echo "No release version found in environment, using input..."
|
||||
RELEASE_VERSION="${{ github.event.inputs.release_version }}"
|
||||
echo "RELEASE_VERSION=${RELEASE_VERSION}" \
|
||||
>> "${GITHUB_ENV}"
|
||||
fi
|
||||
|
||||
# Check the RELEASE_VERSION again
|
||||
if [ -z "${RELEASE_VERSION}" ]; then
|
||||
echo "Error RELEASE_VERSION is empty. Exiting..."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
{
|
||||
echo "RELEASE_VERSION=${RELESE_VERSION}"
|
||||
echo "SEMVER_VERSION=${RELEASE_VERSION#v}"
|
||||
echo "SEMVER_MAJOR_VERSION=${SEMVER_VERSION%%.*}"
|
||||
echo "SEMVER_MAJOR_VERSION_WITH_PREFIX=v${SEMVER_MAJOR_VERSION}"
|
||||
|
|
Loading…
Reference in a new issue