File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed
Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change 11name : Auto Zip and Release
22
33on :
4+ push :
5+ tags :
6+ - ' v*.*.*'
47 workflow_dispatch :
8+ inputs :
9+ release_tag :
10+ description : ' Tag cho release (ví dụ: v1.0.0). Để trống nếu không tạo release.'
11+ required : false
512
613jobs :
714 zip-and-release :
@@ -22,16 +29,17 @@ jobs:
2229 zip -r "package/$name.zip" "$name" -x "$name/README.md"
2330 done
2431
25- # Upload zip files to GitHub Release if a tag is pushed
26- - name : Upload to GitHub Release
27- if : startsWith( github.ref, 'refs/tags/')
32+ # Upload to GitHub Release if tag is provided (manual trigger)
33+ - name : Upload to GitHub Release (manual input)
34+ if : ${{ github.event.inputs.release_tag != '' }}
2835 uses : softprops/action-gh-release@v2
2936 with :
37+ tag_name : ${{ github.event.inputs.release_tag }}
3038 files : package/*.zip
3139 env :
3240 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
3341
34- # Also upload as artifacts (optional: for non-tagged runs )
42+ # Upload as artifacts (in all cases )
3543 - name : Upload zip files as artifact
3644 uses : actions/upload-artifact@v4
3745 with :
You can’t perform that action at this time.
0 commit comments