Skip to content

Commit

Permalink
build: update
Browse files Browse the repository at this point in the history
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
  • Loading branch information
AuxXxilium committed Jul 17, 2024
1 parent 04baf49 commit e7305c2
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -74,6 +73,7 @@ jobs:
uses: ncipollo/release-action@v1
with:
tag: ${{ env.VERSION }}
makeLatest: ${{ inputs.latest }}
prerelease: ${{ inputs.prerelease }}
allowUpdates: true
body: |
Expand Down

0 comments on commit e7305c2

Please sign in to comment.