Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 13 additions & 12 deletions .github/workflows/release-publish.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
name: release-publish
on:
workflow_dispatch:
inputs:
tag:
default: ''
description: 'Version tag (dart-#.#.# or flutter-#.#.#):'
push:
tags:
- "dart-[0-9]+.[0-9]+.[0-9]+*"
- "flutter-[0-9]+.[0-9]+.[0-9]+*"
Comment on lines +5 to +6
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Fix glob patterns in push trigger—they don't match semantic version tags.

The patterns dart-[0-9]+.[0-9]+.[0-9]+* and flutter-[0-9]+.[0-9]+.[0-9]+* use glob syntax where + and . are literal characters, not quantifiers. These patterns will only match tags like dart-0+.0+.0abc, not semantic versions like dart-1.2.3. This prevents the trigger from firing and breaks auto-release.

In glob patterns, [0-9] matches a single digit, and * matches zero or more of any character. To match semantic versions, use:

  • dart-[0-9].[0-9].[0-9]* (matches one digit per part; loose)
  • Or simply dart-* (permissive, relies on conditional checks elsewhere)

Apply this diff to fix the glob patterns:

  push:
    tags:
-     - "dart-[0-9]+.[0-9]+.[0-9]+*"
-     - "flutter-[0-9]+.[0-9]+.[0-9]+*"
+     - "dart-[0-9]*.[0-9]*.[0-9]*"
+     - "flutter-[0-9]*.[0-9]*.[0-9]*"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- "dart-[0-9]+.[0-9]+.[0-9]+*"
- "flutter-[0-9]+.[0-9]+.[0-9]+*"
- "dart-[0-9]*.[0-9]*.[0-9]*"
- "flutter-[0-9]*.[0-9]*.[0-9]*"
🤖 Prompt for AI Agents
.github/workflows/release-publish.yml lines 5-6: the push trigger glob patterns
use regex-like `+` and literal `.` which don't match semantic version tags;
replace the two entries so they match typical tag names (for example use either
`dart-[0-9].[0-9].[0-9]*` and `flutter-[0-9].[0-9].[0-9]*` to loosely match
semver or simply `dart-*` and `flutter-*` for a permissive match), updating both
lines accordingly.

workflow_call:
inputs:
dart_tag:
Expand All @@ -16,12 +15,14 @@ on:
type: string
description: 'Flutter package version tag (flutter-#.#.#)'
env:
# Resolve tags for both workflow_dispatch and workflow_call
dart_tag_resolved: ${{ inputs.dart_tag || (startsWith(inputs.tag, 'dart-') && inputs.tag || '') }}
flutter_tag_resolved: ${{ inputs.flutter_tag || (startsWith(inputs.tag, 'flutter-') && inputs.tag || '') }}
# For tag push: extract from github.ref_name
# For workflow_call: use inputs
package: ${{ startsWith(github.ref_name, 'dart-') && 'dart' || startsWith(github.ref_name, 'flutter-') && 'flutter' || '' }}
dart_tag_resolved: ${{ inputs.dart_tag || (startsWith(github.ref_name, 'dart-') && github.ref_name || '') }}
flutter_tag_resolved: ${{ inputs.flutter_tag || (startsWith(github.ref_name, 'flutter-') && github.ref_name || '') }}
jobs:
pub-publish-dart:
if: inputs.dart_tag != '' || startsWith(inputs.tag, 'dart-')
if: inputs.dart_tag != '' || startsWith(github.ref_name, 'dart-')
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
Expand Down Expand Up @@ -49,7 +50,7 @@ jobs:
run: dart pub publish --force

pub-publish-flutter:
if: inputs.flutter_tag != '' || startsWith(inputs.tag, 'flutter-')
if: inputs.flutter_tag != '' || startsWith(github.ref_name, 'flutter-')
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
Expand Down Expand Up @@ -85,7 +86,7 @@ jobs:
run: dart pub publish --force

docs-publish-dart:
if: inputs.dart_tag != '' || startsWith(inputs.tag, 'dart-')
if: inputs.dart_tag != '' || startsWith(github.ref_name, 'dart-')
needs: pub-publish-dart
runs-on: ubuntu-latest
timeout-minutes: 15
Expand All @@ -108,7 +109,7 @@ jobs:
destination_dir: dart

docs-publish-flutter:
if: inputs.flutter_tag != '' || startsWith(inputs.tag, 'flutter-')
if: inputs.flutter_tag != '' || startsWith(github.ref_name, 'flutter-')
needs: pub-publish-flutter
runs-on: ubuntu-latest
timeout-minutes: 15
Expand Down