Debian Codegraph @

.github/workflows/release.yml

raw symbols SCIP
1 on:
2 workflow_dispatch:
3 schedule:
4 - cron: 0 6 * * *
5 push:
6 branches:
7 - main
8 paths:
9 - configure
10 - m4/version.m4
11 - .github/build/windows/download-configure.sh
12 - .github/build/windows/download-dependencies.sh
13 - .github/workflows/release.yml
14 pull_request:
15 branches:
16 - main
17 paths:
18 - .github/workflows/release.yml
19
20 permissions:
21 contents: read
22
23 name: Release
24 jobs:
25 version:
26 name: Set version
27 runs-on: ubuntu-24.04
28 outputs:
29 version: ${{steps.version.outputs.version}}
30 semantic_version: ${{steps.version.outputs.semantic_version}}
31 publish: ${{steps.version.outputs.publish}}
32
33 steps:
34 - name: Clone ImageMagick
35 uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 #v7.0.1
36 with:
37 fetch-depth: 0
38 persist-credentials: false
39
40 - name: Set version
41 id: version
42 run: |
43 version=$(grep -oP "PACKAGE_VERSION='\K[0-9\.-]*" configure)
44 semantic_version="${version/-/.}"
45 echo "version=$version" >> $GITHUB_OUTPUT
46 echo "version=$version"
47 echo "semantic_version=$semantic_version" >> $GITHUB_OUTPUT
48 echo "semantic_version=$semantic_version"
49 tag=$(git describe --tags HEAD --exact-match || true)
50 if [[ "$tag" == "$version" ]]; then
51 echo "publish=true" >> $GITHUB_OUTPUT
52 echo "publish=true"
53 fi
54
55 changelog:
56 name: Create ChangeLog.md
57 runs-on: ubuntu-24.04
58 needs:
59 - version
60
61 steps:
62 - name: Clone ImageMagick
63 uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 #v7.0.1
64 with:
65 fetch-depth: 0
66 persist-credentials: false
67
68 - name: Install dependencies
69 run: npm install -g git+https://github.com/CookPete/auto-changelog.git#5ba380ad0044dd5be1b2bf4067f64d87202c98bd #v2.5.0
70
71 - name: Create ChangeLog.md
72 env:
73 VERSION: ${{needs.version.outputs.version}}
74 run: |
75 if ! git tag -l | grep -q "^$VERSION$"; then
76 git tag $VERSION
77 fi
78 auto-changelog --sort-commits date
79 mkdir -p Artifacts
80 mv ChangeLog.md Artifacts/ChangeLog.md
81
82 - name: Upload ChangeLog.md
83 uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a #v7.0.1
84 with:
85 name: ChangeLog
86 path: Artifacts
87
88 windows_installer:
89 name: Windows ${{matrix.quantum}}${{matrix.hdri_flag}}-${{matrix.architecture}} (${{matrix.buildType}})
90 runs-on: windows-2025-vs2026
91 needs:
92 - changelog
93 - version
94
95 permissions:
96 contents: read
97 id-token: write
98
99 strategy:
100 fail-fast: false
101 matrix:
102 architecture: [ x64, arm64, x86 ]
103 buildType: [ dynamic, static ]
104 quantum: [ Q16, Q8 ]
105 hdri: [ hdri, noHdri ]
106 exclude:
107 - quantum: Q8
108 hdri: hdri
109 include:
110 - architecture: x64
111 bit: 64
112 - architecture: arm64
113 bit: 64
114 - architecture: x86
115 bit: 32
116 - buildType: dynamic
117 typeName: dll
118 - buildType: static
119 typeName: static
120 - hdri: hdri
121 hdri_flag: -HDRI
122
123 steps:
124 - name: Install Strawberry Perl
125 if: ${{matrix.buildType == 'dynamic' && matrix.architecture != 'arm64'}}
126 shell: cmd
127 run: |
128 powershell Invoke-WebRequest -Uri https://github.com/ImageMagick/Windows/releases/download/build-binaries-2025-08-30/strawberry-perl-5.30.2.1-${{matrix.bit}}bit.msi -OutFile strawberry-perl-5.30.2.1-${{matrix.bit}}bit.msi
129 msiexec /i strawberry-perl-5.30.2.1-${{matrix.bit}}bit.msi /qn INSTALLDIR="C:\Strawberry${{matrix.bit}}"
130 mv "C:\Strawberry" "C:\Strawberry64"
131
132 - name: Install Inno Setup
133 shell: cmd
134 run: |
135 powershell Invoke-WebRequest -Uri https://github.com/ImageMagick/Windows/releases/download/build-binaries-2025-08-30/innosetup-6.2.0.exe -OutFile innosetup-6.2.0.exe
136 innosetup-6.2.0.exe /SILENT /SUPPRESSMSGBOXES /NORESTART /SP-
137
138 - name: Clone ImageMagick
139 uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 #v7.0.1
140 with:
141 path: ImageMagick
142 persist-credentials: false
143
144 - name: Download configure
145 shell: cmd
146 run: |
147 ImageMagick\.github\build\windows\download-configure.cmd
148
149 - name: Download dependencies
150 shell: cmd
151 run: |
152 ImageMagick\.github\build\windows\download-dependencies.cmd windows-${{matrix.architecture}}-${{matrix.buildType}}-openMP.zip
153
154 - name: Download ChangeLog.md
155 uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c #v8.0.1
156 with:
157 name: ChangeLog
158 path: ImageMagick
159
160 - name: Configure ImageMagick
161 shell: cmd
162 working-directory: Configure
163 run: |
164 Configure.Release.x64.exe /noWizard /VS2026 /installedSupport /deprecated /${{matrix.hdri}} /${{matrix.quantum}} /${{matrix.architecture}} /${{matrix.buildType}}
165
166 - name: Build ImageMagick
167 shell: cmd
168 run: |
169 call "C:\Program Files\Microsoft Visual Studio\18\Enterprise\Common7\Tools\VsDevCmd.bat"
170 msbuild /m /t:Rebuild /p:Configuration=Release,Platform=${{matrix.architecture}}
171
172 - name: Build PerlMagick
173 if: ${{matrix.buildType == 'dynamic' && matrix.architecture != 'arm64'}}
174 shell: cmd
175 run: |
176 set PATH=
177 call "C:\Program Files\Microsoft Visual Studio\18\Enterprise\Common7\Tools\VsDevCmd.bat"
178 cd ImageMagick\PerlMagick
179 set PATH=%PATH%;C:\Strawberry${{matrix.bit}}\c\bin;C:\Strawberry${{matrix.bit}}\perl\site\bin;C:\Strawberry${{matrix.bit}}\perl\bin;C:\WINDOWS\System32\WindowsPowerShell\v1.0
180 perl "Makefile.PL" "MAKE=nmake" "CC=g++"
181 nmake
182 nmake release
183
184 - name: Sign executables and libraries
185 uses: ImageMagick/code-signing-action@11c51f7659405bee4dd3529748e1501a0d388911 #v1.0.1
186 with:
187 client-id: ${{ secrets.AZURE_CLIENT_ID }}
188 tenant-id: ${{ secrets.AZURE_TENANT_ID }}
189 subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
190 directory: ${{ github.workspace }}\Artifacts\bin
191 files: '*.exe *.dll'
192
193 - name: Create installer
194 shell: cmd
195 run: |
196 call "C:\Program Files\Microsoft Visual Studio\18\Enterprise\Common7\Tools\VsDevCmd.bat"
197 "C:\Program Files (x86)\Inno Setup 6\iscc.exe" Configure\Installer\Inno\ImageMagick.iss
198
199 - name: Sign installer
200 uses: ImageMagick/code-signing-action@11c51f7659405bee4dd3529748e1501a0d388911 #v1.0.1
201 with:
202 client-id: ${{ secrets.AZURE_CLIENT_ID }}
203 tenant-id: ${{ secrets.AZURE_TENANT_ID }}
204 subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
205 directory: ${{ github.workspace }}\Configure\Installer\Inno\Artifacts
206 files: '*.exe'
207
208 - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a #v7.0.1
209 with:
210 name: ImageMagick-${{needs.version.outputs.version}}-${{matrix.quantum}}${{matrix.hdri_flag}}-${{matrix.typeName}}-${{matrix.architecture}}.exe
211 path: Configure\Installer\Inno\Artifacts
212
213 windows_source:
214 name: Create Windows source archive
215 if: github.event_name != 'pull_request'
216 runs-on: windows-2025
217 needs:
218 - changelog
219 - version
220
221 steps:
222 - name: Clone ImageMagick/Windows
223 uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 #v7.0.1
224 with:
225 repository: ImageMagick/Windows
226 ref: refs/heads/main
227 persist-credentials: false
228
229 - name: Clone repositories
230 shell: cmd
231 run: |
232 clone-repositories-im7.cmd ${{github.sha}}
233
234 - name: Download ChangeLog.md
235 uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c #v8.0.1
236 with:
237 name: ChangeLog
238 path: ImageMagick
239
240 - name: Create Windows source archive
241 shell: cmd
242 env:
243 VERSION: ${{needs.version.outputs.version}}
244 run: |
245 mkdir source
246 move Configure source
247 move Dependencies source
248 move ImageMagick source
249 7z a -mx=9 ImageMagick-%VERSION%-Windows.7z .\source\*
250
251 - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a #v7.0.1
252 with:
253 name: ImageMagick-${{needs.version.outputs.version}}-Windows.7z
254 path: ImageMagick-${{needs.version.outputs.version}}-Windows.7z
255
256 windows_portable:
257 name: Windows portable ${{matrix.quantum}}${{matrix.hdri_flag}}-${{matrix.architecture}}
258 runs-on: windows-2025-vs2026
259 needs:
260 - changelog
261 - version
262
263 permissions:
264 contents: read
265 id-token: write
266
267 strategy:
268 fail-fast: false
269 matrix:
270 architecture: [ x64, arm64, x86 ]
271 quantum: [ Q16, Q8 ]
272 hdri: [ hdri, noHdri ]
273 exclude:
274 - quantum: Q8
275 hdri: hdri
276 include:
277 - hdri: hdri
278 hdri_flag: -HDRI
279
280 steps:
281 - name: Clone ImageMagick
282 uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 #v7.0.1
283 with:
284 path: ImageMagick
285 persist-credentials: false
286
287 - name: Download configure
288 shell: cmd
289 run: |
290 ImageMagick\.github\build\windows\download-configure.cmd
291
292 - name: Download dependencies
293 shell: cmd
294 run: |
295 ImageMagick\.github\build\windows\download-dependencies.cmd windows-${{matrix.architecture}}-static-openMP-linked-runtime.zip
296
297 - name: Download ChangeLog.md
298 uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c #v8.0.1
299 with:
300 name: ChangeLog
301 path: ImageMagick
302
303 - name: Configure ImageMagick
304 shell: cmd
305 working-directory: Configure
306 run: |
307 Configure.Release.x64.exe /noWizard /VS2026 /${{matrix.hdri}} /${{matrix.quantum}} /${{matrix.architecture}} /static /linkRuntime
308
309 - name: Build ImageMagick
310 shell: cmd
311 run: |
312 call "C:\Program Files\Microsoft Visual Studio\18\Enterprise\Common7\Tools\VsDevCmd.bat"
313 msbuild /m /t:Rebuild /p:Configuration=Release,Platform=${{matrix.architecture}}
314
315 - name: Sign executables and libraries
316 uses: ImageMagick/code-signing-action@11c51f7659405bee4dd3529748e1501a0d388911 #v1.0.1
317 with:
318 client-id: ${{ secrets.AZURE_CLIENT_ID }}
319 tenant-id: ${{ secrets.AZURE_TENANT_ID }}
320 subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
321 directory: ${{ github.workspace }}\Artifacts\bin
322 files: '*.exe *.dll'
323
324 - name: Copy Files
325 shell: pwsh
326 env:
327 VERSION: ${{needs.version.outputs.version}}
328 run: |
329 [void](New-Item -Name "portable" -ItemType directory)
330 Copy-Item "Artifacts\bin\*.exe" "portable"
331 Copy-Item "Artifacts\bin\*.xml" "portable"
332 Copy-Item "Artifacts\bin\sRGB.icc" "portable"
333
334 Copy-Item "Artifacts\NOTICE.txt" "portable"
335 Copy-Item "ImageMagick\ChangeLog.md" "portable"
336 Copy-Item "ImageMagick\LICENSE" "portable\LICENSE.txt"
337 7z a -mx=9 "ImageMagick-$env:VERSION-portable-${{matrix.quantum}}${{matrix.hdri_flag}}-${{matrix.architecture}}.7z" .\portable\*
338
339 - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a #v7.0.1
340 with:
341 name: ImageMagick-${{needs.version.outputs.version}}-portable-${{matrix.quantum}}${{matrix.hdri_flag}}-${{matrix.architecture}}.7z
342 path: ImageMagick-${{needs.version.outputs.version}}-portable-${{matrix.quantum}}${{matrix.hdri_flag}}-${{matrix.architecture}}.7z
343
344 windows_msix:
345 name: Create Msix ${{matrix.quantum}}${{matrix.hdri_flag}}
346 if: github.event_name != 'pull_request'
347 runs-on: windows-2025
348 environment: release
349 needs:
350 - version
351 - windows_portable
352
353 permissions:
354 contents: read
355 id-token: write
356
357 strategy:
358 fail-fast: false
359 matrix:
360 quantum: [ Q16, Q8 ]
361 hdri: [ hdri, noHdri ]
362 exclude:
363 - quantum: Q8
364 hdri: hdri
365 include:
366 - hdri: hdri
367 hdri_flag: -HDRI
368
369 steps:
370 - name: Clone ImageMagick
371 uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 #v7.0.1
372 with:
373 path: ImageMagick
374 persist-credentials: false
375
376 - name: Download configure
377 shell: cmd
378 run: |
379 ImageMagick\.github\build\windows\download-configure.cmd
380
381 - name: Download x64 artifacts
382 uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c #v8.0.1
383 with:
384 name: ImageMagick-${{needs.version.outputs.version}}-portable-${{matrix.quantum}}${{matrix.hdri_flag}}-x64.7z
385 path: Configure\Installer\Msix\x64
386
387 - name: Download arm64 artifacts
388 uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c #v8.0.1
389 with:
390 name: ImageMagick-${{needs.version.outputs.version}}-portable-${{matrix.quantum}}${{matrix.hdri_flag}}-arm64.7z
391 path: Configure\Installer\Msix\arm64
392
393 - name: Unzip artifacts
394 shell: pwsh
395 env:
396 VERSION: ${{needs.version.outputs.version}}
397 run: |
398 cd Configure\Installer\Msix\x64
399 7z x "ImageMagick-$env:VERSION-portable-${{matrix.quantum}}${{matrix.hdri_flag}}-x64.7z"
400 cd ../arm64
401 7z x "ImageMagick-$env:VERSION-portable-${{matrix.quantum}}${{matrix.hdri_flag}}-arm64.7z"
402
403 - name: Azure CLI login with federated credential
404 uses: azure/login@532459ea530d8321f2fb9bb10d1e0bcf23869a43 #v3.0.0
405 with:
406 client-id: ${{secrets.AZURE_CLIENT_ID}}
407 tenant-id: ${{secrets.AZURE_TENANT_ID}}
408 subscription-id: ${{secrets.AZURE_SUBSCRIPTION_ID}}
409
410 - name: Create msixbundle with Advanced Installer
411 uses: caphyon/advinst-github-action@7edde34c6ff935e53e3de72a5699efcfceb5f6c6 #v2.0.3
412 with:
413 advinst-license: ${{secrets.ADVINST_LICENSE_KEY}}
414 aip-path: Configure\Installer\Msix\ImageMagick.${{matrix.quantum}}${{matrix.hdri_flag}}.aip
415 aip-build-name: Build_MSIX
416 aip-commands: |
417 SetVersion ${{needs.version.outputs.semantic_version}}
418
419 - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a #v7.0.1
420 with:
421 name: ImageMagick.${{matrix.quantum}}${{matrix.hdri_flag}}.msixbundle
422 path: Configure\Installer\Msix\Artifacts\ImageMagick.${{matrix.quantum}}${{matrix.hdri_flag}}.msixbundle
423
424 linux_app_image:
425 name: Linux AppImage ${{matrix.compiler}}
426 container:
427 image: ubuntu:22.04
428 runs-on: ubuntu-24.04
429 needs:
430 - version
431
432 strategy:
433 matrix:
434 compiler: [ gcc, clang ]
435 include:
436 - compiler: gcc
437 cxx_compiler: g++
438 packages: gcc g++
439 - compiler: clang
440 cxx_compiler: clang++
441 packages: clang
442
443 steps:
444 - name: Install dependencies
445 run: |
446 set -e
447 export DEBIAN_FRONTEND=noninteractive
448 apt-get update -y
449 apt-get install -y autoconf curl file fuse git kmod squashfs-tools libbz2-dev libdjvulibre-dev libfontconfig-dev libfreetype6-dev libfribidi-dev libharfbuzz-dev libheif-dev liblcms-dev libopenexr-dev libopenjp2-7-dev libturbojpeg0-dev liblqr-dev libraqm-dev libtiff-dev libwebp-dev libx11-dev libxml2-dev liblzma-dev make software-properties-common wget ${{matrix.packages}}
450
451 - name: Checkout
452 uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 #v7.0.1
453 with:
454 persist-credentials: false
455
456 # Avoid fatal: detected dubious ownership in repository at '/__w/ImageMagick/ImageMagick'
457 # Possible workaround: https://github.com/actions/runner/issues/2033#issuecomment-1598547465
458 - name: Flag current workspace as safe for git
459 run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
460
461 - name: Download AppImage
462 run: |
463 mkdir /app-image
464 cd /app-image
465 wget -c "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage"
466 chmod a+x linuxdeployqt-continuous-x86_64.AppImage
467 ./linuxdeployqt-continuous-x86_64.AppImage --appimage-extract
468
469 - name: Build ImageMagick
470 env:
471 CFLAGS: -Wno-deprecated-declarations -Wdeclaration-after-statement -Wno-error=unused-variable
472 CC: ${{matrix.compiler}}
473 CXX: ${{matrix.cxx_compiler}}
474 run: |
475 set -e
476 ./configure --with-quantum-depth=16 --without-magick-plus-plus --without-perl --prefix=/usr
477 make
478 make install DESTDIR=$(readlink -f /appdir)
479
480 - name: Create ImageMagick AppImage
481 env:
482 VERSION: ${{needs.version.outputs.version}}-${{matrix.compiler}}
483 run: |
484 set -e
485 mkdir -p /appdir/usr/share/applications/
486 cp ./app-image/imagemagick.desktop /appdir/usr/share/applications/
487 mkdir -p /appdir/usr/share/icons/hicolor/128x128/apps/
488 cp ./app-image/icon.png /appdir/usr/share/icons/hicolor/128x128/apps/imagemagick.png
489 unset QTDIR
490 unset QT_PLUGIN_PATH
491 unset LD_LIBRARY_PATH
492 /app-image/linuxdeployqt-continuous-x86_64.AppImage --appimage-extract-and-run /appdir/usr/share/applications/imagemagick.desktop -bundle-non-qt-libs
493 rm /appdir/AppRun
494 cp ./app-image/AppRun /appdir
495 chmod a+x /appdir/AppRun
496 PATH=/app-image/squashfs-root/usr/bin:$PATH
497 /app-image/squashfs-root/usr/bin/appimagetool -g /appdir/
498 mkdir artifacts
499 cp ImageMagick-$VERSION-x86_64.AppImage artifacts
500 find /appdir -executable -type f -exec ldd {} \; | grep " => /usr" | cut -d " " -f 2-3 | sort | uniq
501
502 - name: Upload ImageMagick AppImage
503 uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a #v7.0.1
504 with:
505 name: AppImage-${{matrix.compiler}}
506 path: artifacts
507
508 source:
509 name: Create source archive
510 runs-on: ubuntu-24.04
511 needs:
512 - changelog
513 - version
514
515 steps:
516 - name: Clone ImageMagick
517 uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 #v7.0.1
518 with:
519 path: ImageMagick
520 persist-credentials: false
521
522 - name: Download ChangeLog.md
523 uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c #v8.0.1
524 with:
525 name: ChangeLog
526 path: ImageMagick
527
528 - name: Create source archive
529 env:
530 VERSION: ${{needs.version.outputs.version}}
531 run: |
532 set -e
533 DIRECTORIES=(
534 ".devcontainer"
535 ".git"
536 ".github"
537 "api_examples"
538 "logo"
539 "oss-fuzz"
540 )
541 FILES=(
542 ".auto-changelog"
543 ".editorconfig"
544 ".gitignore"
545 )
546 for dir_name in "${DIRECTORIES[@]}"; do
547 path="ImageMagick/$dir_name"
548 if [[ -e "$path" ]]; then
549 rm -rf -- "$path"
550 echo "Removed: $dir_name"
551 else
552 echo "Not found: $dir_name"
553 exit 1
554 fi
555 done
556 for file_name in "${FILES[@]}"; do
557 path="ImageMagick/$file_name"
558 if [[ -e "$path" ]]; then
559 rm -f -- "$path"
560 echo "Removed: $file_name"
561 else
562 echo "Not found: $file_name"
563 exit 1
564 fi
565 done
566 mv ImageMagick "ImageMagick-$VERSION"
567 mkdir artifacts
568 7z a -mx=9 "artifacts/ImageMagick-$VERSION.7z" "ImageMagick-$VERSION"
569 XZ_OPT="-9e" tar -cJf "artifacts/ImageMagick-$VERSION.tar.xz" "ImageMagick-$VERSION"
570
571 - name: Upload source archive
572 uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a #v7.0.1
573 with:
574 name: ImageMagick-${{needs.version.outputs.version}}.7z
575 path: artifacts
576
577 release:
578 name: Publish Release
579 if: ${{ needs.version.outputs.publish == 'true' }}
580 runs-on: ubuntu-24.04
581 needs:
582 - version
583 - source
584 - linux_app_image
585 - windows_installer
586 - windows_portable
587 - windows_source
588 - windows_msix
589
590 permissions:
591 contents: write
592 id-token: write
593 attestations: write
594
595 steps:
596 - name: Clone ImageMagick
597 uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 #v7.0.1
598 with:
599 persist-credentials: false
600
601 - name: Download artifacts
602 uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c #v8.0.1
603 with:
604 path: artifacts
605 merge-multiple: true
606
607 - name: Generate SLSA provenance
608 id: attest
609 uses: actions/attest@f7c74d28b9d84cb8768d0b8ca14a4bac6ef463e6 #v4.2.0
610 with:
611 subject-path: |
612 ${{github.workspace}}/artifacts/*.7z
613 ${{github.workspace}}/artifacts/*.AppImage
614 ${{github.workspace}}/artifacts/*.exe
615 ${{github.workspace}}/artifacts/*.msixbundle
616 ${{github.workspace}}/artifacts/*.xz
617
618 - name: Save provenance as an artifact
619 env:
620 BUNDLE_PATH: ${{steps.attest.outputs.bundle-path}}
621 VERSION: ${{needs.version.outputs.version}}
622 run: |
623 cp "$BUNDLE_PATH" "${{github.workspace}}/artifacts/ImageMagick-$VERSION.intoto.jsonl"
624
625 - name: Publish release
626 env:
627 GH_TOKEN: ${{github.token}}
628 VERSION: ${{needs.version.outputs.version}}
629 run: |
630 gh release create "$VERSION" \
631 --title "$VERSION" \
632 --notes "$VERSION" \
633 ${{github.workspace}}/artifacts/*.7z \
634 ${{github.workspace}}/artifacts/*.AppImage \
635 ${{github.workspace}}/artifacts/*.exe \
636 ${{github.workspace}}/artifacts/*.intoto.jsonl \
637 ${{github.workspace}}/artifacts/*.msixbundle \
638 ${{github.workspace}}/artifacts/*.xz
639
640 prepare_msix:
641 name: Prepare Msix
642 if: github.event_name != 'pull_request'
643 runs-on: ubuntu-24.04
644
645 steps:
646 - name: Sync forked winget-pkgs repository
647 env:
648 GH_TOKEN: ${{secrets.WINGET_TOKEN}}
649 run: gh repo sync dlemstra/winget-pkgs --source microsoft/winget-pkgs
650
651 release_msix:
652 name: Publish Msix ${{matrix.quantum}}${{matrix.hdri_flag}}
653 needs:
654 - version
655 - release
656 - prepare_msix
657 runs-on: windows-2025
658
659 strategy:
660 fail-fast: false
661 matrix:
662 quantum: [ Q16, Q8 ]
663 hdri: [ hdri, noHdri ]
664 exclude:
665 - quantum: Q8
666 hdri: hdri
667 include:
668 - hdri: hdri
669 hdri_flag: -HDRI
670
671 steps:
672 - name: Install wingetcreate
673 run: winget install wingetcreate --disable-interactivity --accept-source-agreements
674
675 - name: Update manifest on winget
676 env:
677 VERSION: ${{needs.version.outputs.version}}
678 SEMANTIC_VERSION: ${{needs.version.outputs.semantic_version}}
679 run: wingetcreate update --submit --replace --token ${{secrets.WINGET_TOKEN}} --urls "https://github.com/ImageMagick/ImageMagick/releases/download/$env:VERSION/ImageMagick.${{matrix.quantum}}${{matrix.hdri_flag}}.msixbundle" --version $env:SEMANTIC_VERSION "ImageMagick.${{matrix.quantum}}${{matrix.hdri_flag}}"
680
681 update_website:
682 name: Update website
683 runs-on: ubuntu-24.04
684 needs:
685 - version
686 - release
687
688 steps:
689 - name: Create GitHub app token
690 uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 #v3.2.0
691 id: app-token
692 with:
693 client-id: ${{vars.APP_CLIENT_ID}}
694 private-key: ${{secrets.APP_PRIVATE_KEY}}
695 repositories: Website
696 permission-contents: write
697
698 - name: Clone Website
699 uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 #v7.0.1
700 with:
701 repository: ImageMagick/Website
702 token: ${{steps.app-token.outputs.token}}
703
704 - name: Download ChangeLog.md
705 uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c #v8.0.1
706 with:
707 name: ChangeLog
708
709 - name: Move ChangeLog.md
710 run: |
711 mv ChangeLog.md docs/changelog/index.md
712
713 - name: Configure git
714 run: |
715 git config --global user.name '${{steps.app-token.outputs.app-slug}}[bot]'
716 git config --global user.email '${{vars.APP_USER_ID}}+${{steps.app-token.outputs.app-slug}}[bot]@users.noreply.github.com'
717
718 - name: Update website version
719 env:
720 VERSION: ${{needs.version.outputs.version}}
721 run: |
722 ./update-version.sh "$VERSION" "$(date -u +"%Y-%m-%d")"
723
724 - name: Commit and push changes
725 env:
726 VERSION: ${{needs.version.outputs.version}}
727 run: |
728 git add -A
729 git commit -m "Update version to $VERSION"
730 git push