Skip to content

Commit c80dbc6

Browse files
committed
#34
1 parent ee46409 commit c80dbc6

File tree

1 file changed

+9
-14
lines changed

1 file changed

+9
-14
lines changed

.github/workflows/build.yml

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@ name: Build Electron App and Publish Release
22

33
on:
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

119
jobs:
@@ -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:

0 commit comments

Comments
 (0)