diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index da863df4..3ab2115b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,6 +18,10 @@ on: description: "Notice here" required: false type: string + latest: + description: "latest" + default: true + type: boolean prerelease: description: "pre release" default: false @@ -70,12 +74,7 @@ jobs: if [ -n "${{ inputs.version }}" ]; then VERSION="${{ inputs.version }}" else - LATEST_TAG="$(curl -skL "https://api.github.com/repos/${{ github.repository }}/releases/latest" | jq -r ".tag_name" 2>/dev/null)" - if [[ -n "${LATEST_TAG}" && "`echo ${LATEST_TAG} | cut -d '.' -f 1,2`" = "`date +'%y.%m.%d'`" ]]; then - VERSION="`echo ${LATEST_TAG} | awk -F '.' '{$3=$3+1}1' OFS='.'`" - else - VERSION="`date +'%y.%m.%d'`" - fi + VERSION="`date +'%y.%m.%d'`" fi echo "Version: ${VERSION}" @@ -237,6 +236,7 @@ jobs: with: tag: ${{ env.VERSION }} prerelease: ${{ inputs.prerelease }} + makeLatest: ${{ inputs.latest }} allowUpdates: true body: | ### Information: