chore(ci): fixes release script to correct version

Signed-off-by: Aaron <29749331+aarnphm@users.noreply.github.com>
This commit is contained in:
Aaron
2023-06-29 02:38:44 -04:00
parent 179b570181
commit c76dea468e
2 changed files with 17 additions and 4 deletions

View File

@@ -15,9 +15,22 @@
set -o errexit -o nounset -o pipefail
# Set by GH actions, see
# https://docs.github.com/en/actions/learn-github-actions/environment-variables#default-environment-variables
TAG=${GITHUB_REF_NAME#v}
TAG="$1"
semver_regex='^[1-9][0-9]*\.[1-9][0-9]*\.[1-9][0-9]*$'
# Check if an argument is provided
if [ $# -eq 0 ]; then
echo "No argument provided."
exit 1
fi
if [[ $TAG =~ $semver_regex ]]; then
echo "Valid semver: $TAG"
else
echo "Invalid semver: $TAG"
exit 1
fi
cat > release_notes.txt << EOF
## Installation

View File

@@ -50,7 +50,7 @@ jobs:
- name: Setup CI
uses: ./.github/actions/setup-repo
- name: Create release notes
run: ./.github/actions/create_release_and_archive.sh
run: ./.github/actions/create_release_and_archive.sh ${{ inputs.tags }}
- name: Download Python artifacts
uses: actions/download-artifact@v3
with: