File tree Expand file tree Collapse file tree 1 file changed +9
-14
lines changed
Expand file tree Collapse file tree 1 file changed +9
-14
lines changed Original file line number Diff line number Diff line change @@ -2,10 +2,8 @@ name: Build Electron App and Publish Release
22
33on :
44 push :
5- branches :
6- - main
75 tags :
8- - ' v*'
6+ - ' v*' # Only triggers on tag pushes like v1.5.0, v1.6.0, etc.
97 workflow_dispatch :
108
119jobs :
@@ -51,17 +49,14 @@ jobs:
5149 # Auto increment version using GitHub's Release tag (for example, "v1.2.3")
5250 - name : Increment version for release
5351 run : |
54- # Only increment if on the main branch
55- if [[ $GITHUB_REF == "refs/heads/main" ]]; then
56- VERSION_TAG=$(git describe --tags --abbrev=0)
57- VERSION_MAJOR=$(echo $VERSION_TAG | cut -d'.' -f1)
58- VERSION_MINOR=$(echo $VERSION_TAG | cut -d'.' -f2)
59- VERSION_PATCH=$(echo $VERSION_TAG | cut -d'.' -f3)
60- NEW_VERSION_PATCH=$((VERSION_PATCH + 1))
61- NEW_VERSION="${VERSION_MAJOR}.${VERSION_MINOR}.${NEW_VERSION_PATCH}"
62- git tag $NEW_VERSION
63- git push origin $NEW_VERSION
64- fi
52+ VERSION_TAG=$(git describe --tags --abbrev=0)
53+ VERSION_MAJOR=$(echo $VERSION_TAG | cut -d'.' -f1)
54+ VERSION_MINOR=$(echo $VERSION_TAG | cut -d'.' -f2)
55+ VERSION_PATCH=$(echo $VERSION_TAG | cut -d'.' -f3)
56+ NEW_VERSION_PATCH=$((VERSION_PATCH + 1))
57+ NEW_VERSION="${VERSION_MAJOR}.${VERSION_MINOR}.${NEW_VERSION_PATCH}"
58+ git tag $NEW_VERSION
59+ git push origin $NEW_VERSION
6560
6661 - name : Build Electron app
6762 env :
You can’t perform that action at this time.
0 commit comments