From 4451e70ba8beee5a245018b35ff05596c242152d Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Fri, 1 Mar 2024 18:38:22 +0100 Subject: [PATCH] .github: adjust release tag variables Signed-off-by: Joachim Wiberg --- .github/workflows/release.yml | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5b76cbaa3..6b3c05464 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -102,23 +102,26 @@ jobs: steps: - uses: actions/checkout@v4 - name: Set Release Variables + id: rel run: | if [ -n "${{ inputs.version }}" ]; then ver=${{ inputs.version }} else ver=${GITHUB_REF#refs/tags/} fi - echo "ver=${ver}" >> $GITHUB_OUTPUT + echo "ver=${ver}" >> $GITHUB_OUTPUT if echo $ver | grep -qE 'v[0-9.]+(-alpha|-beta|-rc)[0-9]*'; then - echo "pre=true" >> $GITHUB_OUTPUT - else - echo "pre=false" >> $GITHUB_OUTPUT - fi - if echo $ver | grep -qE '^v[0-9.]+\.[0-9.]+(\.[0-9]+)?$'; then + echo "pre=true" >> $GITHUB_OUTPUT + echo "latest=false" >> $GITHUB_OUTPUT + elif echo $ver | grep -qE '^v[0-9.]+\.[0-9.]+(\.[0-9]+)?$'; then + echo "pre=false" >> $GITHUB_OUTPUT echo "latest=true" >> $GITHUB_OUTPUT else + echo "pre=false" >> $GITHUB_OUTPUT echo "latest=false" >> $GITHUB_OUTPUT fi + echo "pre=${{ steps.rel.outputs.pre }}" + echo "latest=${{ steps.rel.outputs.latest }}" - uses: actions/download-artifact@v4 with: pattern: "artifact-*" @@ -136,8 +139,8 @@ jobs: - uses: ncipollo/release-action@v1 with: name: Infix ${{ github.ref_name }} - prerelease: ${{ steps.release.outputs.pre }} - makeLatest: ${{ steps.release.outputs.latest }} + prerelease: ${{ steps.rel.outputs.pre }} + makeLatest: ${{ steps.rel.outputs.latest }} bodyFile: release.md artifacts: "*.tar.gz*" - name: Summary