From deeedbcc85fd2b57ac992891059ac34fa80fe8ab Mon Sep 17 00:00:00 2001 From: James Griffin Date: Wed, 26 Aug 2026 12:10:53 -0300 Subject: [PATCH] Match version tags with globs, not regex MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Workflow tag filters are glob patterns, so the `[0-9]+` in the previous version had `+` read as a literal plus and would never have matched 1.0.0 — the release would have pushed a tag and quietly built nothing. `[0-9]*.[0-9]*.[0-9]*` uses only basic glob, matches 1.2.3 and 1.2.3-rc1 alike, and still ignores tags that are not versions. The prerelease patterns collapse into it, since the trailing wildcard already absorbs a suffix. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01BGkRmLfiWuJHx6tQ12EELY --- .gitea/workflows/publish.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/publish.yml b/.gitea/workflows/publish.yml index a9ceee4..167aa08 100644 --- a/.gitea/workflows/publish.yml +++ b/.gitea/workflows/publish.yml @@ -27,10 +27,11 @@ on: branches: - main tags: - - '[0-9]+.[0-9]+.[0-9]+' - - '[0-9]+.[0-9]+.[0-9]+-*' - - 'v[0-9]+.[0-9]+.[0-9]+' - - 'v[0-9]+.[0-9]+.[0-9]+-*' + # Glob, not regex: `[0-9]` is one digit and `*` is the rest, so these + # match 1.2.3 and 1.2.3-rc1 while ignoring tags that are not versions. + # A `+` here would be read as a literal plus. + - '[0-9]*.[0-9]*.[0-9]*' + - 'v[0-9]*.[0-9]*.[0-9]*' pull_request: paths: - 'Dockerfile'