win-exe.yml 22 KB

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