Skip to content

Commit 2625811

Browse files
committed
feat(flutter): add workflow_dispatch and tag creation logic
- Add workflow_dispatch trigger for manual version input - Add conditional tag creation after version update - Ensure tag is created on commit with updated pubspec.yaml - Fix pub.dev version mismatch issue
1 parent 74147e2 commit 2625811

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

.github/workflows/release-flutter.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
name: Release Flutter Platform
22

33
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: "Version to release (e.g., 0.1.46)"
8+
required: true
9+
type: string
410
push:
511
tags:
612
- "*"
@@ -44,7 +50,11 @@ jobs:
4450
- name: Get version
4551
id: get_version
4652
run: |
47-
VERSION=${GITHUB_REF#refs/tags/}
53+
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
54+
VERSION="${{ github.event.inputs.version }}"
55+
else
56+
VERSION=${GITHUB_REF#refs/tags/}
57+
fi
4858
echo "version=$VERSION" >> $GITHUB_OUTPUT
4959
echo "Version: $VERSION"
5060

0 commit comments

Comments
 (0)