From 9400885794eb506e4f314f00906a4c58d2dec621 Mon Sep 17 00:00:00 2001 From: dido Date: Mon, 20 Oct 2025 10:28:22 +0200 Subject: [PATCH] fix: update release tag pattern and enhance release task with version argument check --- .github/workflows/release.yml | 2 +- Taskfile.yml | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 43997aa..b025eff 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,7 +3,7 @@ name: Release on: push: tags: - - "[0-9]+.[0-9]+.[0-9]+*" + - "v[0-9]+.[0-9]+.[0-9]+*" env: PROJECT_NAME: "arduino-flasher-cli" diff --git a/Taskfile.yml b/Taskfile.yml index fc0675b..7b1ba3e 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -81,6 +81,17 @@ tasks: - test -f ./updater/artifacts/resources_windows_amd64/qdl.exe cmd: sh ./updater/artifacts/download_resources.sh + release: + desc: Create a tag on the current commit and push it to the remote to create the release + cmds: + - | + if [ -z "{{.CLI_ARGS}}" ]; then + echo "Error: Version argument is required. Usage: task release -- " + exit 1 + fi + - git tag -a "{{.CLI_ARGS}}" -m "Release {{.CLI_ARGS}}" + - git push origin "{{.CLI_ARGS}}" + # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-dependencies-task/Taskfile.yml general:cache-dep-licenses: desc: Cache dependency license metadata