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@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 #v7.0.0
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@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 #v7.0.0
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@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 #v7.0.0
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@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 #v7.0.0
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 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@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 #v7.0.0
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 "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@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 #v7.0.0
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@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 #v7.0.0
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@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 #v7.0.0
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 "oss-fuzz"
539 )
540 FILES=(
541 ".auto-changelog"
542 ".editorconfig"
543 ".gitignore"
544 )
545 for dir_name in "${DIRECTORIES[@]}"; do
546 path="ImageMagick/$dir_name"
547 if [[ -e "$path" ]]; then
548 rm -rf -- "$path"
549 echo "Removed: $dir_name"
550 else
551 echo "Not found: $dir_name"
552 exit 1
553 fi
554 done
555 for file_name in "${FILES[@]}"; do
556 path="ImageMagick/$file_name"
557 if [[ -e "$path" ]]; then
558 rm -f -- "$path"
559 echo "Removed: $file_name"
560 else
561 echo "Not found: $file_name"
562 exit 1
563 fi
564 done
565 mv ImageMagick "ImageMagick-$VERSION"
566 mkdir artifacts
567 7z a -mx=9 "artifacts/ImageMagick-$VERSION.7z" "ImageMagick-$VERSION"
568 XZ_OPT="-9e" tar -cJf "artifacts/ImageMagick-$VERSION.tar.xz" "ImageMagick-$VERSION"
569
570 - name: Upload source archive
571 uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a #v7.0.1
572 with:
573 name: ImageMagick-${{needs.version.outputs.version}}.7z
574 path: artifacts
575
576 release:
577 name: Publish Release
578 if: ${{ needs.version.outputs.publish == 'true' }}
579 runs-on: ubuntu-24.04
580 needs:
581 - version
582 - source
583 - linux_app_image
584 - windows_installer
585 - windows_portable
586 - windows_source
587 - windows_msix
588
589 permissions:
590 contents: write
591 id-token: write
592 attestations: write
593
594 steps:
595 - name: Clone ImageMagick
596 uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 #v7.0.0
597 with:
598 persist-credentials: false
599
600 - name: Download artifacts
601 uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c #v8.0.1
602 with:
603 path: artifacts
604 merge-multiple: true
605
606 - name: Generate SLSA provenance
607 id: attest
608 uses: actions/attest@a1948c3f048ba23858d222213b7c278aabede763 #v4.1.1
609 with:
610 subject-path: |
611 ${{github.workspace}}/artifacts/*.7z
612 ${{github.workspace}}/artifacts/*.AppImage
613 ${{github.workspace}}/artifacts/*.exe
614 ${{github.workspace}}/artifacts/*.msixbundle
615 ${{github.workspace}}/artifacts/*.xz
616
617 - name: Save provenance as an artifact
618 env:
619 BUNDLE_PATH: ${{steps.attest.outputs.bundle-path}}
620 VERSION: ${{needs.version.outputs.version}}
621 run: |
622 cp "$BUNDLE_PATH" "${{github.workspace}}/artifacts/ImageMagick-$VERSION.intoto.jsonl"
623
624 - name: Publish release
625 env:
626 GH_TOKEN: ${{github.token}}
627 VERSION: ${{needs.version.outputs.version}}
628 run: |
629 gh release create "$VERSION" \
630 --title "$VERSION" \
631 --notes "$VERSION" \
632 ${{github.workspace}}/artifacts/*.7z \
633 ${{github.workspace}}/artifacts/*.AppImage \
634 ${{github.workspace}}/artifacts/*.exe \
635 ${{github.workspace}}/artifacts/*.intoto.jsonl \
636 ${{github.workspace}}/artifacts/*.msixbundle \
637 ${{github.workspace}}/artifacts/*.xz
638
639 prepare_msix:
640 name: Prepare Msix
641 if: github.event_name != 'pull_request'
642 runs-on: ubuntu-24.04
643
644 steps:
645 - name: Sync forked winget-pkgs repository
646 env:
647 GH_TOKEN: ${{secrets.WINGET_TOKEN}}
648 run: gh repo sync dlemstra/winget-pkgs --source microsoft/winget-pkgs
649
650 release_msix:
651 name: Publish Msix ${{matrix.quantum}}${{matrix.hdri_flag}}
652 needs:
653 - version
654 - release
655 - prepare_msix
656 runs-on: windows-2025
657
658 strategy:
659 fail-fast: false
660 matrix:
661 quantum: [ Q16, Q8 ]
662 hdri: [ hdri, noHdri ]
663 exclude:
664 - quantum: Q8
665 hdri: hdri
666 include:
667 - hdri: hdri
668 hdri_flag: -HDRI
669
670 steps:
671 - name: Install wingetcreate
672 run: winget install wingetcreate --disable-interactivity --accept-source-agreements
673
674 - name: Update manifest on winget
675 env:
676 VERSION: ${{needs.version.outputs.version}}
677 SEMANTIC_VERSION: ${{needs.version.outputs.semantic_version}}
678 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}}"
679
680 update_website:
681 name: Update website
682 runs-on: ubuntu-24.04
683 needs:
684 - version
685 - release
686
687 steps:
688 - name: Create GitHub app token
689 uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 #v3.2.0
690 id: app-token
691 with:
692 client-id: ${{vars.APP_CLIENT_ID}}
693 private-key: ${{secrets.APP_PRIVATE_KEY}}
694 repositories: Website
695 permission-contents: write
696
697 - name: Clone Website
698 uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 #v7.0.0
699 with:
700 repository: ImageMagick/Website
701 token: ${{steps.app-token.outputs.token}}
702
703 - name: Download ChangeLog.md
704 uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c #v8.0.1
705 with:
706 name: ChangeLog
707
708 - name: Move ChangeLog.md
709 run: |
710 mv ChangeLog.md docs/changelog/index.md
711
712 - name: Update website version
713 env:
714 VERSION: ${{needs.version.outputs.version}}
715 run: |
716 ./update-version.sh "$VERSION" "$(date -u +"%Y-%m-%d")"
717
718 - name: Commit and push changes
719 env:
720 VERSION: ${{needs.version.outputs.version}}
721 run: |
722 git add -A
723 git commit -m "Update version to $VERSION"
724 git push