From e7305c2d458e6f29ceef8f39f03eb056865574e2 Mon Sep 17 00:00:00 2001 From: AuxXxilium Date: Wed, 17 Jul 2024 16:27:55 +0200 Subject: [PATCH] build: update Signed-off-by: AuxXxilium --- .github/workflows/build.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2ffa2e1..f878715 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,9 +4,13 @@ on: workflow_dispatch: inputs: version: - description: "format %y.%-m.$i or auto" + description: "format %y.%m.$d or auto" required: false type: string + latest: + description: "latest" + default: true + type: boolean prerelease: description: "pre release" default: false @@ -40,12 +44,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 # format %y.%-m.$i - VERSION="`echo ${LATEST_TAG} | awk -F '.' '{$3=$3+1}1' OFS='.'`" - else - VERSION="`date +'%y.%-m.%-d'`" - fi + VERSION="`date +'%y.%m.%d'`" fi if [ -n "${VERSION}" ]; then @@ -74,6 +73,7 @@ jobs: uses: ncipollo/release-action@v1 with: tag: ${{ env.VERSION }} + makeLatest: ${{ inputs.latest }} prerelease: ${{ inputs.prerelease }} allowUpdates: true body: |