Skip to content

Commit 66229a6

Browse files
authored
fix: update release tag pattern and enhance release task with version argument check (#10)
1 parent a64949d commit 66229a6

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Release
33
on:
44
push:
55
tags:
6-
- "[0-9]+.[0-9]+.[0-9]+*"
6+
- "v[0-9]+.[0-9]+.[0-9]+*"
77

88
env:
99
PROJECT_NAME: "arduino-flasher-cli"

Taskfile.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,17 @@ tasks:
8181
- test -f ./updater/artifacts/resources_windows_amd64/qdl.exe
8282
cmd: sh ./updater/artifacts/download_resources.sh
8383

84+
release:
85+
desc: Create a tag on the current commit and push it to the remote to create the release
86+
cmds:
87+
- |
88+
if [ -z "{{.CLI_ARGS}}" ]; then
89+
echo "Error: Version argument is required. Usage: task release -- <version>"
90+
exit 1
91+
fi
92+
- git tag -a "{{.CLI_ARGS}}" -m "Release {{.CLI_ARGS}}"
93+
- git push origin "{{.CLI_ARGS}}"
94+
8495
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-dependencies-task/Taskfile.yml
8596
general:cache-dep-licenses:
8697
desc: Cache dependency license metadata

0 commit comments

Comments
 (0)