win-exe.yml 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487
  1. name: Build Windows Installer
  2. on:
  3. release:
  4. types: [published]
  5. workflow_dispatch:
  6. inputs:
  7. version:
  8. description: 'Version'
  9. required: false
  10. isDebug:
  11. description: 'Build debug version with console output'
  12. type: boolean
  13. default: false
  14. sign:
  15. description: 'Sign binaries'
  16. required: false
  17. type: boolean
  18. default: false
  19. push:
  20. branches-ignore:
  21. - 'dependabot/**'
  22. paths:
  23. - '.github/workflows/win-exe.yml'
  24. - 'dist/win/**'
  25. env:
  26. OPENJFX_JMODS_AMD64: 'https://download2.gluonhq.com/openjfx/24.0.1/openjfx-24.0.1_windows-x64_bin-jmods.zip'
  27. OPENJFX_JMODS_AMD64_HASH: 'f13d17c7caf88654fc835f1b4e75a9b0f34a888eb8abef381796c0002e63b03f'
  28. WINFSP_MSI: 'https://github.com/winfsp/winfsp/releases/download/v2.1/winfsp-2.1.25156.msi'
  29. WINFSP_MSI_HASH: '073a70e00f77423e34bed98b86e600def93393ba5822204fac57a29324db9f7a'
  30. WINFSP_UNINSTALLER: 'https://github.com/cryptomator/winfsp-uninstaller/releases/latest/download/winfsp-uninstaller.exe'
  31. defaults:
  32. run:
  33. shell: bash
  34. jobs:
  35. get-version:
  36. uses: ./.github/workflows/get-version.yml
  37. with:
  38. version: ${{ inputs.version }}
  39. build-msi:
  40. name: Build .msi Installer
  41. runs-on: ${{ matrix.os }}
  42. needs: [ get-version ]
  43. strategy:
  44. matrix:
  45. include:
  46. - arch: x64
  47. os: windows-latest
  48. java-dist: 'zulu'
  49. java-version: '24.0.1+9'
  50. java-package: 'jdk'
  51. - arch: arm64
  52. os: windows-11-arm
  53. java-dist: 'liberica'
  54. java-version: '24.0.1+11'
  55. java-package: 'jdk+fx' #This is needed, as liberica contains JFX 24 Jmods for Windows ARM64
  56. steps:
  57. - uses: actions/checkout@v5
  58. - name: Setup Java
  59. uses: actions/setup-java@v5
  60. with:
  61. distribution: ${{ matrix.java-dist }}
  62. java-version: ${{ matrix.java-version }}
  63. java-package: ${{ matrix.java-package }}
  64. check-latest: true
  65. cache: 'maven'
  66. - name: Install wix and extensions
  67. run: |
  68. dotnet tool install --global wix --version 6.0.0
  69. wix.exe extension add WixToolset.UI.wixext/6.0.0 --global
  70. wix.exe extension add WixToolset.Util.wixext/6.0.0 --global
  71. - name: Download and extract JavaFX jmods from Gluon
  72. if: matrix.arch == 'x64'
  73. #In the last step we move all jmods files a dir level up because jmods are placed inside a directory in the zip
  74. run: |
  75. curl --output openjfx-jmods.zip -L "${{ env.OPENJFX_JMODS_AMD64 }}"
  76. if(!(Get-FileHash -Path openjfx-jmods.zip -Algorithm SHA256).Hash.ToLower().equals("${{ env.OPENJFX_JMODS_AMD64_HASH }}")) {
  77. throw "Wrong checksum of JMOD archive downloaded from ${{ env.OPENJFX_JMODS_AMD64 }}.";
  78. }
  79. Expand-Archive -Path openjfx-jmods.zip -DestinationPath openjfx-jmods
  80. Get-ChildItem -Path openjfx-jmods -Recurse -Filter "*.jmod" | ForEach-Object { Move-Item -Path $_ -Destination $_.Directory.Parent}
  81. shell: pwsh
  82. - name: Ensure major jfx version in pom and in jmods is the same
  83. if: matrix.arch == 'x64'
  84. run: |
  85. JMOD_VERSION_AMD64=$(jmod describe openjfx-jmods/javafx.base.jmod | head -1)
  86. JMOD_VERSION_AMD64=${JMOD_VERSION_AMD64#*@}
  87. JMOD_VERSION_AMD64=${JMOD_VERSION_AMD64%%.*}
  88. POM_JFX_VERSION=$(mvn help:evaluate "-Dexpression=javafx.version" -q -DforceStdout)
  89. POM_JFX_VERSION=${POM_JFX_VERSION#*@}
  90. POM_JFX_VERSION=${POM_JFX_VERSION%%.*}
  91. if [ $POM_JFX_VERSION -ne $JMOD_VERSION_AMD64 ]; then
  92. >&2 echo "Major JavaFX version in pom.xml (${POM_JFX_VERSION}) != amd64 jmod version (${JMOD_VERSION_AMD64})"
  93. exit 1
  94. fi
  95. - name: Set version
  96. run: mvn versions:set -DnewVersion=${{ needs.get-version.outputs.semVerStr }}
  97. - name: Run maven
  98. run: mvn -B clean package -Pwin -DskipTests -Djavafx.platform=win
  99. - name: Patch target dir
  100. run: |
  101. cp LICENSE.txt target
  102. cp target/cryptomator-*.jar target/mods
  103. - name: Run jlink with help option
  104. id: jep-493-check
  105. run: |
  106. JMOD_PATHS="openjfx-jmods"
  107. if ! $(${JAVA_HOME}/bin/jlink --help | grep -q "Linking from run-time image enabled"); then
  108. JMOD_PATHS="${JAVA_HOME}/jmods;${JMOD_PATHS}"
  109. fi
  110. echo "jmod_paths=${JMOD_PATHS}" >> "$GITHUB_OUTPUT"
  111. - name: Run jlink
  112. # Remark: no compression is applied for improved build compression later (here msi)
  113. run: >
  114. ${JAVA_HOME}/bin/jlink
  115. --verbose
  116. --output runtime
  117. --module-path "${{ steps.jep-493-check.outputs.jmod_paths }}"
  118. --add-modules java.base,java.desktop,java.instrument,java.logging,java.naming,java.net.http,java.scripting,java.sql,java.xml,javafx.base,javafx.graphics,javafx.controls,javafx.fxml,jdk.crypto.mscapi,jdk.unsupported,jdk.accessibility,jdk.management.jfr,java.compiler
  119. --strip-native-commands
  120. --no-header-files
  121. --no-man-pages
  122. --strip-debug
  123. --compress zip-0
  124. - name: Run jpackage
  125. run: >
  126. ${JAVA_HOME}/bin/jpackage
  127. --verbose
  128. --type app-image
  129. --runtime-image runtime
  130. --input target/libs
  131. --module-path target/mods
  132. --module org.cryptomator.desktop/org.cryptomator.launcher.Cryptomator
  133. --dest appdir
  134. --name Cryptomator
  135. --vendor "Skymatic GmbH"
  136. --copyright "(C) 2016 - 2025 Skymatic GmbH"
  137. --app-version "${{ needs.get-version.outputs.semVerNum }}.${{ needs.get-version.outputs.revNum }}"
  138. --java-options "--enable-preview"
  139. --java-options "--enable-native-access=javafx.graphics,org.cryptomator.jfuse.win,org.cryptomator.integrations.win"
  140. --java-options "--sun-misc-unsafe-memory-access=allow"
  141. --java-options "-Xss5m"
  142. --java-options "-Xmx256m"
  143. --java-options "-Dcryptomator.appVersion=\"${{ needs.get-version.outputs.semVerStr }}\""
  144. --java-options "-Dfile.encoding=\"utf-8\""
  145. --java-options "-Djava.net.useSystemProxies=true"
  146. --java-options "-Dcryptomator.logDir=\"@{localappdata}/Cryptomator\""
  147. --java-options "-Dcryptomator.pluginDir=\"@{appdata}/Cryptomator/Plugins\""
  148. --java-options "-Dcryptomator.settingsPath=\"@{appdata}/Cryptomator/settings.json;@{userhome}/AppData/Roaming/Cryptomator/settings.json\""
  149. --java-options "-Dcryptomator.p12Path=\"@{appdata}/Cryptomator/key.p12;@{userhome}/AppData/Roaming/Cryptomator/key.p12\""
  150. --java-options "-Dcryptomator.ipcSocketPath=\"@{localappdata}/Cryptomator/ipc.socket\""
  151. --java-options "-Dcryptomator.mountPointsDir=\"@{userhome}/Cryptomator\""
  152. --java-options "-Dcryptomator.loopbackAlias=\"cryptomator-vault\""
  153. --java-options "-Dcryptomator.showTrayIcon=true"
  154. --java-options "-Dcryptomator.buildNumber=\"msi-${{ needs.get-version.outputs.revNum }}\""
  155. --java-options "-Dcryptomator.integrationsWin.autoStartShellLinkName=\"Cryptomator\""
  156. --java-options "-Dcryptomator.integrationsWin.keychainPaths=\"@{appdata}/Cryptomator/keychain.json;@{userhome}/AppData/Roaming/Cryptomator/keychain.json\""
  157. --java-options "-Dcryptomator.integrationsWin.windowsHelloKeychainPaths=\"@{appdata}/Cryptomator/windowsHelloKeychain.json\""
  158. --java-options "-Dcryptomator.disableUpdateCheck=false"
  159. --java-options "-XX:ErrorFile=C:/cryptomator/cryptomator_crash.log"
  160. --resource-dir dist/win/resources
  161. --icon dist/win/resources/Cryptomator.ico
  162. --add-launcher "Cryptomator (Debug)=dist/win/debug-launcher.properties"
  163. - name: Patch Application Directory
  164. run: |
  165. cp dist/win/contrib/* appdir/Cryptomator
  166. - name: Fix permissions
  167. run: |
  168. attrib -r appdir/Cryptomator/Cryptomator.exe
  169. attrib -r "appdir/Cryptomator/Cryptomator (Debug).exe"
  170. shell: pwsh
  171. - name: Extract jars with DLLs for Codesigning
  172. shell: pwsh
  173. run: |
  174. Add-Type -AssemblyName "System.io.compression.filesystem"
  175. $jarFolder = Resolve-Path ".\appdir\Cryptomator\app\mods"
  176. $jarExtractDir = New-Item -Path ".\appdir\jar-extract" -ItemType Directory
  177. #for all jars inspect
  178. Get-ChildItem -Path $jarFolder -Filter "*.jar" | ForEach-Object {
  179. $jar = [Io.compression.zipfile]::OpenRead($_.FullName)
  180. if (@($jar.Entries | Where-Object {$_.Name.ToString().EndsWith(".dll")} | Select-Object -First 1).Count -gt 0) {
  181. #jars containing dlls extract
  182. Set-Location $jarExtractDir
  183. Expand-Archive -Path $_.FullName
  184. }
  185. $jar.Dispose()
  186. }
  187. - name: Extract wixhelper.dll for Codesigning #see https://github.com/cryptomator/cryptomator/issues/3130
  188. shell: pwsh
  189. run: |
  190. New-Item -Path appdir/jpackage-jmod -ItemType Directory
  191. & $env:JAVA_HOME\bin\jmod.exe extract --dir jpackage-jmod "${env:JAVA_HOME}\jmods\jdk.jpackage.jmod"
  192. Get-ChildItem -Recurse -Path "jpackage-jmod" -File wixhelper.dll | Select-Object -Last 1 | Copy-Item -Destination "appdir"
  193. - name: Sign DLLs with Actalis CodeSigner
  194. if: inputs.sign || github.event_name == 'release'
  195. uses: skymatic/workflows/.github/actions/win-sign-action@450e322ff2214d0be0b079b63343c894f3ef735f
  196. with:
  197. base-dir: 'appdir'
  198. file-extensions: 'dll,exe,ps1'
  199. recursive: true
  200. sign-description: 'Cryptomator'
  201. sign-url: 'https://cryptomator.org'
  202. username: ${{ secrets.WIN_CODESIGN_USERNAME }}
  203. password: ${{ secrets.WIN_CODESIGN_PW }}
  204. - name: Replace DLLs inside jars with signed ones
  205. shell: pwsh
  206. run: |
  207. $jarExtractDir = Resolve-Path ".\appdir\jar-extract"
  208. $jarFolder = Resolve-Path ".\appdir\Cryptomator\app\mods"
  209. Get-ChildItem -Path $jarExtractDir | ForEach-Object {
  210. $jarName = $_.Name
  211. $jarFile = "${jarFolder}\${jarName}.jar"
  212. Set-Location $_
  213. Get-ChildItem -Path $_ -Recurse -File "*.dll" | ForEach-Object {
  214. # update jar with signed dll
  215. jar --file="$jarFile" --update $(Resolve-Path -Relative -Path $_)
  216. }
  217. }
  218. - name: Generate license for MSI
  219. run: >
  220. mvn -B license:add-third-party "-Djavafx.platform=win"
  221. "-Dlicense.thirdPartyFilename=license.rtf"
  222. "-Dlicense.outputDirectory=dist/win/resources"
  223. "-Dlicense.fileTemplate=dist/win/resources/licenseTemplate.ftl"
  224. "-Dlicense.includedScopes=compile"
  225. "-Dlicense.excludedGroups=^org\.cryptomator"
  226. "-Dlicense.failOnMissing=true"
  227. "-Dlicense.licenseMergesUrl=file:///${{ github.workspace }}/license/merges"
  228. shell: pwsh
  229. - name: Create MSI
  230. run: >
  231. ${JAVA_HOME}/bin/jpackage
  232. --verbose
  233. --type msi
  234. --win-upgrade-uuid bda45523-42b1-4cae-9354-a45475ed4775
  235. --app-image appdir/Cryptomator
  236. --dest installer
  237. --name Cryptomator
  238. --vendor "Skymatic GmbH"
  239. --copyright "(C) 2016 - 2025 Skymatic GmbH"
  240. --app-version "${{ needs.get-version.outputs.semVerNum }}.${{ needs.get-version.outputs.revNum}}"
  241. --win-menu
  242. --win-dir-chooser
  243. --win-shortcut-prompt
  244. --win-update-url "https:\\cryptomator.org\downloads"
  245. --win-menu-group Cryptomator
  246. --resource-dir dist/win/resources
  247. --license-file dist/win/resources/license.rtf
  248. --file-associations dist/win/resources/FAvaultFile.properties
  249. env:
  250. JP_WIXWIZARD_RESOURCES: ${{ github.workspace }}/dist/win/resources # requires abs path, used in resources/main.wxs
  251. JP_WIXHELPER_DIR: ${{ github.workspace }}\appdir
  252. - name: Sign msi with Actalis CodeSigner
  253. if: inputs.sign || github.event_name == 'release'
  254. uses: skymatic/workflows/.github/actions/win-sign-action@450e322ff2214d0be0b079b63343c894f3ef735f
  255. with:
  256. base-dir: 'installer'
  257. file-extensions: 'msi'
  258. sign-description: 'Cryptomator Installer'
  259. sign-url: 'https://cryptomator.org'
  260. username: ${{ secrets.WIN_CODESIGN_USERNAME }}
  261. password: ${{ secrets.WIN_CODESIGN_PW }}
  262. - name: Add possible alpha/beta tags and architecture to installer name
  263. run: mv installer/Cryptomator-*.msi Cryptomator-${{ needs.get-version.outputs.semVerStr }}-${{ matrix.arch }}.msi
  264. - name: Create detached GPG signature with key 615D449FE6E6A235
  265. run: |
  266. echo "${GPG_PRIVATE_KEY}" | gpg --batch --quiet --import
  267. echo "${GPG_PASSPHRASE}" | gpg --batch --quiet --passphrase-fd 0 --pinentry-mode loopback -u 615D449FE6E6A235 --detach-sign -a Cryptomator-*.msi
  268. env:
  269. GPG_PRIVATE_KEY: ${{ secrets.RELEASES_GPG_PRIVATE_KEY }}
  270. GPG_PASSPHRASE: ${{ secrets.RELEASES_GPG_PASSPHRASE }}
  271. - name: Upload artifacts
  272. uses: actions/upload-artifact@v4
  273. with:
  274. name: msi-${{ matrix.arch }}
  275. path: |
  276. Cryptomator-*.msi
  277. Cryptomator-*.asc
  278. if-no-files-found: error
  279. build-exe:
  280. name: Build .exe installer
  281. runs-on: ${{ matrix.os }}
  282. needs: [ get-version, build-msi ]
  283. strategy:
  284. matrix:
  285. include:
  286. - arch: x64
  287. os: windows-latest
  288. executable-suffix: x64
  289. java-dist: 'zulu'
  290. java-version: '24.0.1+9'
  291. java-package: 'jdk'
  292. - arch: arm64
  293. os: windows-11-arm
  294. executable-suffix: arm64
  295. java-dist: 'liberica'
  296. java-version: '24.0.1+11'
  297. java-package: 'jdk+fx' #This is needed, as liberica contains JFX 24 Jmods for Windows ARM64
  298. steps:
  299. - uses: actions/checkout@v5
  300. - name: Install wix and extensions
  301. run: |
  302. dotnet tool install --global wix --version 6.0.0
  303. wix.exe extension add WixToolset.BootstrapperApplications.wixext/6.0.0 --global
  304. wix.exe extension add WixToolset.Util.wixext/6.0.0 --global
  305. - name: Download .msi
  306. uses: actions/download-artifact@v5
  307. with:
  308. name: msi-${{ matrix.arch }}
  309. path: dist/win/bundle/resources
  310. - name: Strip version info from msi file name
  311. run: mv dist/win/bundle/resources/Cryptomator*.msi dist/win/bundle/resources/Cryptomator.msi
  312. - name: Setup Java
  313. uses: actions/setup-java@v5
  314. with:
  315. distribution: ${{ matrix.java-dist }}
  316. java-version: ${{ matrix.java-version }}
  317. java-package: ${{ matrix.java-package }}
  318. check-latest: true
  319. cache: 'maven'
  320. - name: Generate license for exe
  321. run: >
  322. mvn -B license:add-third-party "-Djavafx.platform=win"
  323. "-Dlicense.thirdPartyFilename=license.rtf"
  324. "-Dlicense.fileTemplate=dist/win/bundle/resources/licenseTemplate.ftl"
  325. "-Dlicense.outputDirectory=dist/win/bundle/resources"
  326. "-Dlicense.includedScopes=compile"
  327. "-Dlicense.excludedGroups=^org\.cryptomator"
  328. "-Dlicense.failOnMissing=true"
  329. "-Dlicense.licenseMergesUrl=file:///${{ github.workspace }}/license/merges"
  330. shell: pwsh
  331. - name: Download WinFsp
  332. run: |
  333. curl --output $env:WINFSP_PATH -L ${{ env.WINFSP_MSI }}
  334. $computedHash = (Get-FileHash -Path $env:WINFSP_PATH -Algorithm SHA256).Hash.ToLower()
  335. if ($computedHash -ne "${{ env.WINFSP_MSI_HASH }}") {
  336. throw "Checksum mismatch for $env:WINFSP_PATH (expected ${{ env.WINFSP_MSI_HASH }}, got $computedHash)."
  337. }
  338. env:
  339. WINFSP_PATH: 'dist/win/bundle/resources/winfsp.msi'
  340. shell: pwsh
  341. - name: Download Legacy-WinFsp uninstaller
  342. run: |
  343. curl --output dist/win/bundle/resources/winfsp-uninstaller.exe -L ${{ env.WINFSP_UNINSTALLER }}
  344. shell: pwsh
  345. - name: Create Wix Burn bundle
  346. working-directory: dist/win
  347. run: >
  348. wix build
  349. -define BundleName="Cryptomator"
  350. -define BundleVersion="${{ needs.get-version.outputs.semVerNum }}.${{ needs.get-version.outputs.revNum}}"
  351. -define BundleVendor="Skymatic GmbH"
  352. -define BundleCopyright="(C) 2016 - 2025 Skymatic GmbH"
  353. -define AboutUrl="https://cryptomator.org"
  354. -define HelpUrl="https://cryptomator.org/contact"
  355. -define UpdateUrl="https://cryptomator.org/downloads/"
  356. -ext "WixToolset.Util.wixext"
  357. -ext "WixToolset.BootstrapperApplications.wixext"
  358. ./bundle/bundleWithWinfsp.wxs
  359. -out "../../installer/unsigned/Cryptomator-Installer.exe"
  360. - name: Detach burn engine in preparation to sign
  361. run: >
  362. wix burn detach installer/unsigned/Cryptomator-Installer.exe -engine tmp/engine.exe
  363. - name: Sign burn engine with Actalis CodeSigner
  364. if: inputs.sign || github.event_name == 'release'
  365. uses: skymatic/workflows/.github/actions/win-sign-action@450e322ff2214d0be0b079b63343c894f3ef735f
  366. with:
  367. base-dir: 'tmp'
  368. file-extensions: 'exe'
  369. sign-description: 'Cryptomator Bundle Installer'
  370. sign-url: 'https://cryptomator.org'
  371. username: ${{ secrets.WIN_CODESIGN_USERNAME }}
  372. password: ${{ secrets.WIN_CODESIGN_PW }}
  373. - name: Reattach signed burn engine to installer
  374. run: >
  375. wix burn reattach installer/unsigned/Cryptomator-Installer.exe -engine tmp/engine.exe -o installer/Cryptomator-Installer.exe
  376. - name: Sign installer with Actalis CodeSigner
  377. if: inputs.sign || github.event_name == 'release'
  378. uses: skymatic/workflows/.github/actions/win-sign-action@450e322ff2214d0be0b079b63343c894f3ef735f
  379. with:
  380. base-dir: 'installer'
  381. file-extensions: 'exe'
  382. sign-description: 'Cryptomator Bundle Installer'
  383. sign-url: 'https://cryptomator.org'
  384. username: ${{ secrets.WIN_CODESIGN_USERNAME }}
  385. password: ${{ secrets.WIN_CODESIGN_PW }}
  386. - name: Add possible alpha/beta tags to installer name
  387. run: mv installer/Cryptomator-Installer.exe Cryptomator-${{ needs.get-version.outputs.semVerStr }}-${{ matrix.executable-suffix }}.exe
  388. - name: Create detached GPG signature with key 615D449FE6E6A235
  389. run: |
  390. echo "${GPG_PRIVATE_KEY}" | gpg --batch --quiet --import
  391. echo "${GPG_PASSPHRASE}" | gpg --batch --quiet --passphrase-fd 0 --pinentry-mode loopback -u 615D449FE6E6A235 --detach-sign -a Cryptomator-*.exe
  392. env:
  393. GPG_PRIVATE_KEY: ${{ secrets.RELEASES_GPG_PRIVATE_KEY }}
  394. GPG_PASSPHRASE: ${{ secrets.RELEASES_GPG_PASSPHRASE }}
  395. - name: Upload artifacts
  396. uses: actions/upload-artifact@v4
  397. with:
  398. name: exe-${{ matrix.executable-suffix }}
  399. path: |
  400. Cryptomator-*.exe
  401. Cryptomator-*.asc
  402. if-no-files-found: error
  403. publish:
  404. name: Publish installers to the github release
  405. if: startsWith(github.ref, 'refs/tags/') && github.event.action == 'published'
  406. runs-on: ubuntu-latest
  407. needs: [ build-msi, build-exe ]
  408. outputs:
  409. download-url-msi-x64: ${{ fromJSON(steps.publish.outputs.assets)[0].browser_download_url }}
  410. download-url-msi-arm64: ${{ fromJSON(steps.publish.outputs.assets)[1].browser_download_url }}
  411. download-url-exe-x64: ${{ fromJSON(steps.publish.outputs.assets)[2].browser_download_url }}
  412. download-url-exe-arm64: ${{ fromJSON(steps.publish.outputs.assets)[3].browser_download_url }}
  413. steps:
  414. - name: Download installers
  415. uses: actions/download-artifact@v5
  416. with:
  417. merge-multiple: true
  418. - name: Publish installers on GitHub Releases
  419. id: publish
  420. uses: softprops/action-gh-release@v2
  421. with:
  422. fail_on_unmatched_files: true
  423. token: ${{ secrets.CRYPTOBOT_RELEASE_TOKEN }}
  424. # do not change ordering of filelist, required for correct job output
  425. files: |
  426. *x64.msi
  427. *arm64.msi
  428. *x64.exe
  429. *arm64.exe
  430. *.asc
  431. allowlist-msi-x64:
  432. uses: ./.github/workflows/av-whitelist.yml
  433. needs: [ publish ]
  434. with:
  435. url: ${{ needs.publish.outputs.download-url-msi-x64 }}
  436. secrets: inherit
  437. allowlist-msi-arm64:
  438. uses: ./.github/workflows/av-whitelist.yml
  439. needs: [ publish ]
  440. with:
  441. url: ${{ needs.publish.outputs.download-url-msi-arm64 }}
  442. secrets: inherit
  443. allowlist-exe-x64:
  444. uses: ./.github/workflows/av-whitelist.yml
  445. needs: [ publish, allowlist-msi-x64 ]
  446. with:
  447. url: ${{ needs.publish.outputs.download-url-exe-x64 }}
  448. secrets: inherit
  449. allowlist-exe-arm64:
  450. uses: ./.github/workflows/av-whitelist.yml
  451. needs: [ publish, allowlist-msi-arm64 ]
  452. with:
  453. url: ${{ needs.publish.outputs.download-url-exe-arm64 }}
  454. secrets: inherit
  455. notify-winget:
  456. name: Notify for winget-release
  457. if: needs.get-version.outputs.versionType == 'stable'
  458. needs: [publish, get-version]
  459. runs-on: ubuntu-latest
  460. steps:
  461. - name: Slack Notification
  462. uses: rtCamp/action-slack-notify@v2
  463. env:
  464. SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
  465. SLACK_USERNAME: 'Cryptobot'
  466. SLACK_ICON: false
  467. SLACK_ICON_EMOJI: ':bot:'
  468. SLACK_CHANNEL: 'cryptomator-desktop'
  469. SLACK_TITLE: "MSI packages of ${{ github.event.repository.name }} ${{ github.event.release.tag_name }} published."
  470. SLACK_MESSAGE: "Ready to <https://github.com/${{ github.repository }}/actions/workflows/winget.yml| release them to winget>."
  471. SLACK_FOOTER: false
  472. MSG_MINIMAL: true