diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 775ef86e2..4af1da36f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -4,7 +4,7 @@ on: pull_request: types: [closed] branches: - - master + - 'v*.*.*' - develop - beta - stable @@ -57,7 +57,7 @@ jobs: export VERSION=$(bash ./scripts/calculate_version.sh) echo "VERSION=$VERSION" >> $GITHUB_ENV echo "Version $VERSION" - ( test $BRANCH = "stable" || test $BRANCH = "master" && export PRERELEASE=false ) || export PRERELEASE=true + ( test $BRANCH = "stable" && export PRERELEASE=false ) || export PRERELEASE=true echo "PRERELEASE=$PRERELEASE" >> $GITHUB_ENV echo ------------ download binaries LIB_BLS_RELEASE_TAG=${{ secrets.LIB_BLS_RELEASE_TAG }} bash ./scripts/download_binaries.sh diff --git a/VERSION b/VERSION index d0149fef7..dc1e644a1 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.3.4 +1.6.0 diff --git a/scripts/calculate_version.sh b/scripts/calculate_version.sh index 4d91e795e..dc30babc9 100755 --- a/scripts/calculate_version.sh +++ b/scripts/calculate_version.sh @@ -16,16 +16,19 @@ if [ -z "$VERSION" ]; then exit 1 fi -if [[ $BRANCH == 'master' ]]; then +if [[ $BRANCH == 'stable' ]]; then echo "$VERSION" exit 1 fi git fetch --tags > /dev/null +TAG=$BRANCH +if [[ $BRANCH == 'v*.*.*' ]]; then TAG='develop'; fi + for (( NUMBER=0; ; NUMBER++ )) do - FULL_VERSION="$VERSION-$BRANCH.$NUMBER" + FULL_VERSION="$VERSION-$TAG.$NUMBER" if ! [[ $(git tag -l | grep "$FULL_VERSION") ]]; then echo "$FULL_VERSION" | tr / - break