From 30af0f623bf17bc945f964e2242b724fa532a39b Mon Sep 17 00:00:00 2001 From: dido Date: Mon, 20 Oct 2025 09:01:06 +0200 Subject: [PATCH 1/9] fix: update release workflow name and refine tag creation process --- .github/workflows/release.yml | 4 ++-- Taskfile.yml | 12 ++++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c30773f..0e21f15 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,9 +1,9 @@ -name: Release arduino-app +name: Release arduino-router on: push: tags: - - "*" # Trigger on all tags + - "[0-9]+.[0-9]+.[0-9]+*" env: GO_VERSION: "1.25.1" diff --git a/Taskfile.yml b/Taskfile.yml index 4d274e6..c1d4975 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -62,6 +62,18 @@ tasks: vars: ARCH: '{{.ARCH | default "arm64"}}' + + 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}}" + board:install: desc: Install arduino-router on the board interactive: true From 43568d6deccec8a2f30f86e05f6d7844061660fd Mon Sep 17 00:00:00 2001 From: dido Date: Mon, 20 Oct 2025 09:08:21 +0200 Subject: [PATCH 2/9] format --- .github/workflows/release.yml | 2 +- Taskfile.yml | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0e21f15..a53d201 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,7 +3,7 @@ name: Release arduino-router on: push: tags: - - "[0-9]+.[0-9]+.[0-9]+*" + - "[0-9]+.[0-9]+.[0-9]+*" env: GO_VERSION: "1.25.1" diff --git a/Taskfile.yml b/Taskfile.yml index c1d4975..3157f60 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -62,7 +62,6 @@ tasks: vars: ARCH: '{{.ARCH | default "arm64"}}' - release: desc: Create a tag on the current commit and push it to the remote to create the release cmds: From 218e545d3901ad37231c8ecf3736a34226745bca Mon Sep 17 00:00:00 2001 From: dido Date: Mon, 20 Oct 2025 09:11:22 +0200 Subject: [PATCH 3/9] chore: remove hardcoded Go version and use go.mod for versioning in workflows --- .github/workflows/go-test.yml | 4 +--- .github/workflows/release.yml | 3 +-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/go-test.yml b/.github/workflows/go-test.yml index f0de1b1..364c5e2 100644 --- a/.github/workflows/go-test.yml +++ b/.github/workflows/go-test.yml @@ -6,8 +6,6 @@ on: pull_request: branches: [main] -env: - GO_VERSION: "1.25.1" jobs: go-test: @@ -19,7 +17,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: ${{ env.GO_VERSION }} + go-version-file: go.mod - name: Run tests run: go tool task test diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a53d201..86abdb8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,7 +6,6 @@ on: - "[0-9]+.[0-9]+.[0-9]+*" env: - GO_VERSION: "1.25.1" PROJECT_NAME: "arduino-router" GITHUB_TOKEN: ${{ secrets.ARDUINOBOT_TOKEN }} GITHUB_USERNAME: ArduinoBot @@ -34,7 +33,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: ${{ env.GO_VERSION }} + go-version-file: go.mod - name: Build deb run: | From 9c4e39957ad5f11290bb027f801c22f2417cbb63 Mon Sep 17 00:00:00 2001 From: dido Date: Mon, 20 Oct 2025 09:13:36 +0200 Subject: [PATCH 4/9] chore: remove unnecessary blank line in go-test workflow --- .github/workflows/go-test.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/go-test.yml b/.github/workflows/go-test.yml index 364c5e2..3c9c446 100644 --- a/.github/workflows/go-test.yml +++ b/.github/workflows/go-test.yml @@ -6,7 +6,6 @@ on: pull_request: branches: [main] - jobs: go-test: runs-on: ubuntu-latest From c6305579fe86edf36e6ce5ce95576f69fb4a619c Mon Sep 17 00:00:00 2001 From: dido Date: Mon, 20 Oct 2025 10:01:15 +0200 Subject: [PATCH 5/9] fix: correct tag pattern in release workflow to include 'v' prefix --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 86abdb8..12312da 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,7 +3,7 @@ name: Release arduino-router on: push: tags: - - "[0-9]+.[0-9]+.[0-9]+*" + - "v[0-9]+.[0-9]+.[0-9]+*" env: PROJECT_NAME: "arduino-router" From 07c0c3790268ecdd487bd4f77e94a1f4213178bd Mon Sep 17 00:00:00 2001 From: dido Date: Mon, 20 Oct 2025 10:09:38 +0200 Subject: [PATCH 6/9] chore: update Ubuntu version in build matrix to 24.04 --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 12312da..8251dfd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,7 +14,7 @@ jobs: build: strategy: matrix: - os: [ubuntu-22.04] + os: [ubuntu-24.04] arch: [amd64, arm64] runs-on: ${{ matrix.os }} From 4a11988aa66d3c203bb02dec6c9f67a9dfa9ecfd Mon Sep 17 00:00:00 2001 From: dido Date: Mon, 20 Oct 2025 10:20:10 +0200 Subject: [PATCH 7/9] chore: revert Ubuntu version in build matrix to 22.04 --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8251dfd..12312da 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,7 +14,7 @@ jobs: build: strategy: matrix: - os: [ubuntu-24.04] + os: [ubuntu-22.04] arch: [amd64, arm64] runs-on: ${{ matrix.os }} From c2eba8bd42ba2dda3e34c81e6384f4999d522612 Mon Sep 17 00:00:00 2001 From: dido Date: Tue, 21 Oct 2025 09:23:49 +0200 Subject: [PATCH 8/9] fix: enhance release task to validate version format and improve tagging process --- Taskfile.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/Taskfile.yml b/Taskfile.yml index 3157f60..b0d1e9a 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -65,14 +65,20 @@ tasks: 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 -- " + - echo "Create tag version {{ .TAG }}" + - git tag "{{ .TAG }}" + - git push origin "{{ .TAG }}" + vars: + TAG: + sh: | + TAGARG="{{.CLI_ARGS}}" + if ! echo "$TAGARG" | grep -qE '^v[0-9]+\.[0-9]+\.[0-9]+.*$'; then + echo "Error: Version must match pattern 'v[0-9]+.[0-9]+.[0-9]+*'" + echo " Invalid version: $TAGARG" + echo " Valid examples: v1.0.0, v2.1.3, v1.0.0-beta, v3.2.1-rc.1" exit 1 fi - - git tag -a "{{.CLI_ARGS}}" -m "Release {{.CLI_ARGS}}" - - git push origin "{{.CLI_ARGS}}" - + echo $TAGARG board:install: desc: Install arduino-router on the board interactive: true From f48e0b22bff454d14c531ab17749c32fbb2efd9c Mon Sep 17 00:00:00 2001 From: dido Date: Tue, 21 Oct 2025 09:25:26 +0200 Subject: [PATCH 9/9] fix: validate version format in release tagging process --- Taskfile.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Taskfile.yml b/Taskfile.yml index b0d1e9a..91323c0 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -69,8 +69,8 @@ tasks: - git tag "{{ .TAG }}" - git push origin "{{ .TAG }}" vars: - TAG: - sh: | + TAG: + sh: | TAGARG="{{.CLI_ARGS}}" if ! echo "$TAGARG" | grep -qE '^v[0-9]+\.[0-9]+\.[0-9]+.*$'; then echo "Error: Version must match pattern 'v[0-9]+.[0-9]+.[0-9]+*'"