Skip to content

Commit

Permalink
fix: use correct index to extract semver
Browse files Browse the repository at this point in the history
  • Loading branch information
Jei committed May 8, 2020
1 parent 23c4f9a commit f2ac851
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/alpha_android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ jobs:
id: prepare_variables
run: |
semver_regex="^([0-9]|[1-9][0-9]*)\.([0-9]|[1-9][0-9]*)\.([0-9]|[1-9][0-9]*)$"
[[ ${GITHUB_REF:9} =~ $semver_regex ]] && echo ::set-output name=build_name::"${GITHUB_REF:9}" || (echo "Build name ${GITHUB_REF:9} is not semver" && exit 1);
BUILD_NAME="${GITHUB_REF:20}"
[[ $BUILD_NAME =~ $semver_regex ]] && echo ::set-output name=build_name::"$BUILD_NAME" || (echo "Build name $BUILD_NAME is not semver" && exit 1);
TIMESTAMP=`date +%s`
echo ::set-output name=build_number::$TIMESTAMP
echo ::set-output name=release_name::"${GITHUB_REF:9}+$TIMESTAMP"
echo ::set-output name=release_name::"$BUILD_NAME+$TIMESTAMP"
##############################################
# setup actions
Expand Down

0 comments on commit f2ac851

Please sign in to comment.