Skip to content

Commit

Permalink
Update release job tag pattern and version extraction logic in GitHub…
Browse files Browse the repository at this point in the history
… Actions workflow
  • Loading branch information
ndonathan committed Nov 17, 2024
1 parent 5556a12 commit f38ecf7
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ on:
push:
branches:
- main
tags:
- 'v1.1.*'
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'

jobs:
build:
Expand Down Expand Up @@ -44,7 +44,6 @@ jobs:
!fyne-cross/dist/*/deps/
release:
if: startsWith(github.ref, 'refs/tags/')
needs: [build]
runs-on: ubuntu-latest
steps:
Expand All @@ -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
Expand Down

0 comments on commit f38ecf7

Please sign in to comment.