win-exe.yml 22 KB

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