Skip to content

Commit b387432

Browse files
committed
fix: remove tag triggers from CI workflow and fix snapshot version template
1 parent 14819f9 commit b387432

2 files changed

Lines changed: 11 additions & 6 deletions

File tree

.github/workflows/ci.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ on:
55
branches:
66
- main
77
- develop
8-
tags:
9-
- "v*"
108
pull_request:
119
branches:
1210
- main
@@ -223,19 +221,26 @@ jobs:
223221
run: |
224222
# Get the latest tag
225223
LATEST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "v0.0.0")
224+
echo "Latest tag: ${LATEST_TAG}"
225+
226226
# Remove 'v' prefix
227227
VERSION=${LATEST_TAG#v}
228-
# Increment patch version
228+
echo "Version without prefix: ${VERSION}"
229+
230+
# Parse version components
229231
IFS='.' read -r major minor patch <<< "$VERSION"
232+
echo "Version components: major=${major}, minor=${minor}, patch=${patch}"
233+
234+
# Generate new version
230235
NEW_VERSION="${major}.${minor}.$((patch + 1))-dev.$(date +%Y%m%d%H%M%S)+$(git rev-parse --short HEAD)"
231-
echo "version=${NEW_VERSION}" >> $GITHUB_OUTPUT
232236
echo "Pre-release version: ${NEW_VERSION}"
237+
echo "version=${NEW_VERSION}" >> $GITHUB_OUTPUT
233238
234239
- name: Run GoReleaser (snapshot)
235240
uses: goreleaser/goreleaser-action@v6
236241
with:
237242
version: latest
238-
args: release --snapshot --skip=sign --clean
243+
args: release --snapshot --skip=sign --clean --skip=validate
239244
env:
240245
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
241246
GORELEASER_CURRENT_TAG: "v${{ steps.version.outputs.version }}"

.goreleaser.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,4 +153,4 @@ announce:
153153

154154
# Snapshot configuration (for development builds)
155155
snapshot:
156-
name_template: "{{ incpatch .Version }}-dev"
156+
version_template: "{{ incpatch .Version }}-dev-{{ .ShortCommit }}"

0 commit comments

Comments
 (0)