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