From f38ecf70148579f219420c9b28d422587ea4299d Mon Sep 17 00:00:00 2001 From: Nick Donathan <31076657+ndonathan@users.noreply.github.com> Date: Sun, 17 Nov 2024 17:46:34 -0600 Subject: [PATCH] Update release job tag pattern and version extraction logic in GitHub Actions workflow --- .github/workflows/release.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 72febdc..3457876 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,8 +7,8 @@ on: push: branches: - main - tags: - - 'v1.1.*' + tags: + - 'v[0-9]+.[0-9]+.[0-9]+' jobs: build: @@ -44,7 +44,6 @@ jobs: !fyne-cross/dist/*/deps/ release: - if: startsWith(github.ref, 'refs/tags/') needs: [build] runs-on: ubuntu-latest steps: @@ -55,7 +54,12 @@ jobs: - name: Extract version id: version - run: echo "VERSION=${GITHUB_REF_NAME}" >> $GITHUB_OUTPUT + run: | + if [[ $GITHUB_REF == refs/tags/* ]]; then + echo "VERSION=${GITHUB_REF_NAME}" >> $GITHUB_OUTPUT + else + echo "VERSION=v0.0.${GITHUB_RUN_NUMBER}" >> $GITHUB_OUTPUT + fi - name: Create Release id: create_release