Skip to content

Commit 39c9298

Browse files
committed
update release ci to upload zip for each arch
1 parent 4880375 commit 39c9298

File tree

1 file changed

+35
-15
lines changed

1 file changed

+35
-15
lines changed

.github/workflows/release.yml

Lines changed: 35 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -139,37 +139,57 @@ jobs:
139139
Write-Host "File Version: $($vi.FileVersion)"
140140
}
141141
142-
- name: Upload build artifacts (ZIPs)
142+
- name: Upload build artifact (x64 ZIP)
143143
uses: actions/upload-artifact@v4
144144
with:
145-
name: MagickCrop-zips
146-
path: |
147-
${{ env.ARCHIVE_X64_SC }}
148-
${{ env.ARCHIVE_ARM64_SC }}
145+
name: MagickCrop-win-x64
146+
path: ${{ env.ARCHIVE_X64_SC }}
147+
148+
- name: Upload build artifact (arm64 ZIP)
149+
uses: actions/upload-artifact@v4
150+
with:
151+
name: MagickCrop-win-arm64
152+
path: ${{ env.ARCHIVE_ARM64_SC }}
149153

150-
- name: Compute release tag and name
154+
- name: Compute release tags and names (separate per-arch)
151155
shell: pwsh
152156
run: |
153-
$tag = "${{ github.event.inputs.tag }}"
154-
if ([string]::IsNullOrWhiteSpace($tag)) { $tag = "v${{ github.run_number }}" }
155-
echo "RELEASE_TAG=$tag" >> $env:GITHUB_ENV
157+
$baseTag = "${{ github.event.inputs.tag }}"
158+
if ([string]::IsNullOrWhiteSpace($baseTag)) { $baseTag = "v${{ github.run_number }}" }
159+
echo "RELEASE_TAG_X64=$baseTag-x64" >> $env:GITHUB_ENV
160+
echo "RELEASE_TAG_ARM64=$baseTag-arm64" >> $env:GITHUB_ENV
156161
157-
$name = "${{ github.event.inputs.name }}"
158-
if ([string]::IsNullOrWhiteSpace($name)) { $name = "MagickCrop $tag" }
159-
echo "RELEASE_NAME=$name" >> $env:GITHUB_ENV
162+
$baseName = "${{ github.event.inputs.name }}"
163+
if ([string]::IsNullOrWhiteSpace($baseName)) { $baseName = "MagickCrop $baseTag" }
164+
echo "RELEASE_NAME_X64=$baseName (x64)" >> $env:GITHUB_ENV
165+
echo "RELEASE_NAME_ARM64=$baseName (arm64)" >> $env:GITHUB_ENV
160166
161-
- name: Create draft GitHub release and upload assets
167+
- name: Create draft GitHub release (x64) and upload asset
162168
uses: softprops/action-gh-release@v2
163169
env:
164170
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
165171
with:
166-
tag_name: ${{ env.RELEASE_TAG }}
167-
name: ${{ env.RELEASE_NAME }}
172+
tag_name: ${{ env.RELEASE_TAG_X64 }}
173+
name: ${{ env.RELEASE_NAME_X64 }}
168174
target_commitish: ${{ github.sha }}
169175
draft: true
170176
prerelease: true
171177
generate_release_notes: true
172178
fail_on_unmatched_files: true
173179
files: |
174180
${{ env.ARCHIVE_X64_SC }}
181+
182+
- name: Create draft GitHub release (arm64) and upload asset
183+
uses: softprops/action-gh-release@v2
184+
env:
185+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
186+
with:
187+
tag_name: ${{ env.RELEASE_TAG_ARM64 }}
188+
name: ${{ env.RELEASE_NAME_ARM64 }}
189+
target_commitish: ${{ github.sha }}
190+
draft: true
191+
prerelease: true
192+
generate_release_notes: true
193+
fail_on_unmatched_files: true
194+
files: |
175195
${{ env.ARCHIVE_ARM64_SC }}

0 commit comments

Comments
 (0)