File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,8 +2,10 @@ name: Build and Release EasySFTP
22
33on :
44 push :
5+ branches :
6+ - ' *'
57 tags :
6- - ' v*' # v1.2.3.4 のようなタグが push されたら発火
8+ - ' v*'
79 workflow_dispatch :
810
911jobs :
4951 echo "❌ Required deps cache was not found. Aborting."
5052 exit 1
5153
52- # --- Common.user.props の生成 ---
5354 - name : Generate Common.user.props
5455 shell : pwsh
5556 run : |
@@ -107,15 +108,15 @@ jobs:
107108 path : dist/
108109
109110 - name : Create zip archive
110- if : github.event_name != 'workflow_dispatch'
111+ if : startsWith(github.ref, 'refs/tags/') && github.event_name != 'workflow_dispatch'
111112 shell : pwsh
112113 run : |
113114 $tag = "${{ github.ref_name }}" # 例: v1.2.3.4
114115 $version = $tag.TrimStart("v") # 先頭のvを取る
115116 Compress-Archive -Path dist\* -DestinationPath "EasySFTP-$version.zip"
116117
117118 - name : Extract release notes from CHANGELOG.md
118- if : github.event_name != 'workflow_dispatch'
119+ if : startsWith(github.ref, 'refs/tags/') && github.event_name != 'workflow_dispatch'
119120 id : changelog
120121 shell : pwsh
121122 run : |
@@ -139,7 +140,7 @@ jobs:
139140 }
140141
141142 - name : Upload release asset
142- if : github.event_name != 'workflow_dispatch'
143+ if : startsWith(github.ref, 'refs/tags/') && github.event_name != 'workflow_dispatch'
143144 uses : softprops/action-gh-release@v2
144145 with :
145146 tag_name : ${{ env.TAG_NAME }}
You can’t perform that action at this time.
0 commit comments