File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44 push :
55 tags :
66 - ' v*.*.*'
7+ workflow_dispatch :
8+ inputs :
9+ version :
10+ description : ' Release version (e.g., v1.0.0)'
11+ required : true
12+ type : string
713
814permissions :
915 contents : write
2026
2127 - name : 🏷️ Get version
2228 id : version
23- run : echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
29+ run : |
30+ if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
31+ echo "tag=${{ inputs.version }}" >> $GITHUB_OUTPUT
32+ else
33+ echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
34+ fi
2435
2536 - name : 🎉 Create Release
2637 uses : softprops/action-gh-release@v2
8394
8495 - name : 🏷️ Get version
8596 id : version
86- run : echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
97+ run : |
98+ if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
99+ echo "tag=${{ inputs.version }}" >> $GITHUB_OUTPUT
100+ else
101+ echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
102+ fi
87103
88104 - name : 🔑 Login to Docker Hub (Optional)
89105 continue-on-error : true
You can’t perform that action at this time.
0 commit comments