win-exe.yml 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499
  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: skymatic/workflows/.github/actions/win-sign-action@450e322ff2214d0be0b079b63343c894f3ef735f
  208. with:
  209. base-dir: 'appdir'
  210. file-extensions: 'dll,exe,ps1'
  211. recursive: true
  212. sign-description: 'Cryptomator'
  213. sign-url: 'https://cryptomator.org'
  214. username: ${{ secrets.WIN_CODESIGN_USERNAME }}
  215. password: ${{ secrets.WIN_CODESIGN_PW }}
  216. - name: Replace DLLs inside jars with signed ones
  217. shell: pwsh
  218. run: |
  219. $jarExtractDir = Resolve-Path ".\appdir\jar-extract"
  220. $jarFolder = Resolve-Path ".\appdir\Cryptomator\app\mods"
  221. Get-ChildItem -Path $jarExtractDir | ForEach-Object {
  222. $jarName = $_.Name
  223. $jarFile = "${jarFolder}\${jarName}.jar"
  224. Set-Location $_
  225. Get-ChildItem -Path $_ -Recurse -File "*.dll" | ForEach-Object {
  226. # update jar with signed dll
  227. jar --file="$jarFile" --update $(Resolve-Path -Relative -Path $_)
  228. }
  229. }
  230. - name: Generate license for MSI
  231. run: >
  232. mvn -B license:add-third-party "-Djavafx.platform=win"
  233. "-Dlicense.thirdPartyFilename=license.rtf"
  234. "-Dlicense.outputDirectory=dist/win/resources"
  235. "-Dlicense.fileTemplate=dist/win/resources/licenseTemplate.ftl"
  236. "-Dlicense.includedScopes=compile"
  237. "-Dlicense.excludedGroups=^org\.cryptomator"
  238. "-Dlicense.failOnMissing=true"
  239. "-Dlicense.licenseMergesUrl=file:///${{ github.workspace }}/license/merges"
  240. shell: pwsh
  241. - name: Create MSI
  242. run: >
  243. ${JAVA_HOME}/bin/jpackage
  244. --verbose
  245. --type msi
  246. --win-upgrade-uuid bda45523-42b1-4cae-9354-a45475ed4775
  247. --app-image appdir/Cryptomator
  248. --dest installer
  249. --name Cryptomator
  250. --vendor "Skymatic GmbH"
  251. --copyright "(C) 2016 - 2025 Skymatic GmbH"
  252. --app-version "${{ needs.get-version.outputs.semVerNum }}.${{ needs.get-version.outputs.revNum}}"
  253. --win-menu
  254. --win-dir-chooser
  255. --win-shortcut-prompt
  256. --win-update-url "https:\\cryptomator.org\downloads"
  257. --win-menu-group Cryptomator
  258. --resource-dir dist/win/resources
  259. --license-file dist/win/resources/license.rtf
  260. --file-associations dist/win/resources/FAvaultFile.properties
  261. env:
  262. JP_WIXWIZARD_RESOURCES: ${{ github.workspace }}/dist/win/resources # requires abs path, used in resources/main.wxs
  263. JP_WIXHELPER_DIR: ${{ github.workspace }}\appdir
  264. - name: Sign msi with Actalis CodeSigner
  265. if: inputs.sign || github.event_name == 'release'
  266. uses: skymatic/workflows/.github/actions/win-sign-action@450e322ff2214d0be0b079b63343c894f3ef735f
  267. with:
  268. base-dir: 'installer'
  269. file-extensions: 'msi'
  270. sign-description: 'Cryptomator Installer'
  271. sign-url: 'https://cryptomator.org'
  272. username: ${{ secrets.WIN_CODESIGN_USERNAME }}
  273. password: ${{ secrets.WIN_CODESIGN_PW }}
  274. - name: Add possible alpha/beta tags and architecture to installer name
  275. run: mv installer/Cryptomator-*.msi Cryptomator-${{ needs.get-version.outputs.semVerStr }}-${{ matrix.arch }}.msi
  276. - name: Create detached GPG signature with key 615D449FE6E6A235
  277. run: |
  278. echo "${GPG_PRIVATE_KEY}" | gpg --batch --quiet --import
  279. echo "${GPG_PASSPHRASE}" | gpg --batch --quiet --passphrase-fd 0 --pinentry-mode loopback -u 615D449FE6E6A235 --detach-sign -a Cryptomator-*.msi
  280. env:
  281. GPG_PRIVATE_KEY: ${{ secrets.RELEASES_GPG_PRIVATE_KEY }}
  282. GPG_PASSPHRASE: ${{ secrets.RELEASES_GPG_PASSPHRASE }}
  283. - name: Upload artifacts
  284. uses: actions/upload-artifact@v4
  285. with:
  286. name: msi-${{ matrix.arch }}
  287. path: |
  288. Cryptomator-*.msi
  289. Cryptomator-*.asc
  290. if-no-files-found: error
  291. build-exe:
  292. name: Build .exe installer
  293. runs-on: ${{ matrix.os }}
  294. needs: [ get-version, build-msi ]
  295. strategy:
  296. matrix:
  297. include:
  298. - arch: x64
  299. os: windows-latest
  300. executable-suffix: x64
  301. java-dist: 'zulu'
  302. java-version: '24.0.1+9'
  303. java-package: 'jdk'
  304. - arch: arm64
  305. os: windows-11-arm
  306. executable-suffix: arm64
  307. java-dist: 'liberica'
  308. java-version: '24.0.1+11'
  309. java-package: 'jdk+fx' #This is needed, as liberica contains JFX 24 Jmods for Windows ARM64
  310. steps:
  311. - uses: actions/checkout@v4
  312. - name: Install wix and extensions
  313. run: |
  314. dotnet tool install --global wix --version 6.0.0
  315. wix.exe extension add WixToolset.BootstrapperApplications.wixext/6.0.0 --global
  316. wix.exe extension add WixToolset.Util.wixext/6.0.0 --global
  317. - name: Download .msi
  318. uses: actions/download-artifact@v4
  319. with:
  320. name: msi-${{ matrix.arch }}
  321. path: dist/win/bundle/resources
  322. - name: Strip version info from msi file name
  323. run: mv dist/win/bundle/resources/Cryptomator*.msi dist/win/bundle/resources/Cryptomator.msi
  324. - name: Setup Java
  325. uses: actions/setup-java@v4
  326. with:
  327. distribution: ${{ matrix.java-dist }}
  328. java-version: ${{ matrix.java-version }}
  329. java-package: ${{ matrix.java-package }}
  330. check-latest: true
  331. cache: 'maven'
  332. - name: Generate license for exe
  333. run: >
  334. mvn -B license:add-third-party "-Djavafx.platform=win"
  335. "-Dlicense.thirdPartyFilename=license.rtf"
  336. "-Dlicense.fileTemplate=dist/win/bundle/resources/licenseTemplate.ftl"
  337. "-Dlicense.outputDirectory=dist/win/bundle/resources"
  338. "-Dlicense.includedScopes=compile"
  339. "-Dlicense.excludedGroups=^org\.cryptomator"
  340. "-Dlicense.failOnMissing=true"
  341. "-Dlicense.licenseMergesUrl=file:///${{ github.workspace }}/license/merges"
  342. shell: pwsh
  343. - name: Download WinFsp
  344. run: |
  345. curl --output $env:WINFSP_PATH -L ${{ env.WINFSP_MSI }}
  346. $computedHash = (Get-FileHash -Path $env:WINFSP_PATH -Algorithm SHA256).Hash.ToLower()
  347. if ($computedHash -ne "${{ env.WINFSP_MSI_HASH }}") {
  348. throw "Checksum mismatch for $env:WINFSP_PATH (expected ${{ env.WINFSP_MSI_HASH }}, got $computedHash)."
  349. }
  350. env:
  351. WINFSP_PATH: 'dist/win/bundle/resources/winfsp.msi'
  352. shell: pwsh
  353. - name: Download Legacy-WinFsp uninstaller
  354. run: |
  355. curl --output dist/win/bundle/resources/winfsp-uninstaller.exe -L ${{ env.WINFSP_UNINSTALLER }}
  356. shell: pwsh
  357. - name: Create Wix Burn bundle
  358. working-directory: dist/win
  359. run: >
  360. wix build
  361. -define BundleName="Cryptomator"
  362. -define BundleVersion="${{ needs.get-version.outputs.semVerNum }}.${{ needs.get-version.outputs.revNum}}"
  363. -define BundleVendor="Skymatic GmbH"
  364. -define BundleCopyright="(C) 2016 - 2025 Skymatic GmbH"
  365. -define AboutUrl="https://cryptomator.org"
  366. -define HelpUrl="https://cryptomator.org/contact"
  367. -define UpdateUrl="https://cryptomator.org/downloads/"
  368. -ext "WixToolset.Util.wixext"
  369. -ext "WixToolset.BootstrapperApplications.wixext"
  370. ./bundle/bundleWithWinfsp.wxs
  371. -out "../../installer/unsigned/Cryptomator-Installer.exe"
  372. - name: Detach burn engine in preparation to sign
  373. run: >
  374. wix burn detach installer/unsigned/Cryptomator-Installer.exe -engine tmp/engine.exe
  375. - name: Sign burn engine with Actalis CodeSigner
  376. if: inputs.sign || github.event_name == 'release'
  377. uses: skymatic/workflows/.github/actions/win-sign-action@450e322ff2214d0be0b079b63343c894f3ef735f
  378. with:
  379. base-dir: 'tmp'
  380. file-extensions: 'exe'
  381. sign-description: 'Cryptomator Bundle Installer'
  382. sign-url: 'https://cryptomator.org'
  383. username: ${{ secrets.WIN_CODESIGN_USERNAME }}
  384. password: ${{ secrets.WIN_CODESIGN_PW }}
  385. - name: Reattach signed burn engine to installer
  386. run: >
  387. wix burn reattach installer/unsigned/Cryptomator-Installer.exe -engine tmp/engine.exe -o installer/Cryptomator-Installer.exe
  388. - name: Sign installer with Actalis CodeSigner
  389. if: inputs.sign || github.event_name == 'release'
  390. uses: skymatic/workflows/.github/actions/win-sign-action@450e322ff2214d0be0b079b63343c894f3ef735f
  391. with:
  392. base-dir: 'installer'
  393. file-extensions: 'exe'
  394. sign-description: 'Cryptomator Bundle Installer'
  395. sign-url: 'https://cryptomator.org'
  396. username: ${{ secrets.WIN_CODESIGN_USERNAME }}
  397. password: ${{ secrets.WIN_CODESIGN_PW }}
  398. - name: Add possible alpha/beta tags to installer name
  399. run: mv installer/Cryptomator-Installer.exe Cryptomator-${{ needs.get-version.outputs.semVerStr }}-${{ matrix.executable-suffix }}.exe
  400. - name: Create detached GPG signature with key 615D449FE6E6A235
  401. run: |
  402. echo "${GPG_PRIVATE_KEY}" | gpg --batch --quiet --import
  403. echo "${GPG_PASSPHRASE}" | gpg --batch --quiet --passphrase-fd 0 --pinentry-mode loopback -u 615D449FE6E6A235 --detach-sign -a Cryptomator-*.exe
  404. env:
  405. GPG_PRIVATE_KEY: ${{ secrets.RELEASES_GPG_PRIVATE_KEY }}
  406. GPG_PASSPHRASE: ${{ secrets.RELEASES_GPG_PASSPHRASE }}
  407. - name: Upload artifacts
  408. uses: actions/upload-artifact@v4
  409. with:
  410. name: exe-${{ matrix.executable-suffix }}
  411. path: |
  412. Cryptomator-*.exe
  413. Cryptomator-*.asc
  414. if-no-files-found: error
  415. publish:
  416. name: Publish installers to the github release
  417. if: startsWith(github.ref, 'refs/tags/') && github.event.action == 'published'
  418. runs-on: ubuntu-latest
  419. needs: [ build-msi, build-exe ]
  420. outputs:
  421. download-url-msi-x64: ${{ fromJSON(steps.publish.outputs.assets)[0].browser_download_url }}
  422. download-url-msi-arm64: ${{ fromJSON(steps.publish.outputs.assets)[1].browser_download_url }}
  423. download-url-exe-x64: ${{ fromJSON(steps.publish.outputs.assets)[2].browser_download_url }}
  424. download-url-exe-arm64: ${{ fromJSON(steps.publish.outputs.assets)[3].browser_download_url }}
  425. steps:
  426. - name: Download installers
  427. uses: actions/download-artifact@v4
  428. with:
  429. merge-multiple: true
  430. - name: Publish installers on GitHub Releases
  431. id: publish
  432. uses: softprops/action-gh-release@v2
  433. with:
  434. fail_on_unmatched_files: true
  435. token: ${{ secrets.CRYPTOBOT_RELEASE_TOKEN }}
  436. # do not change ordering of filelist, required for correct job output
  437. files: |
  438. *x64.msi
  439. *arm64.msi
  440. *x64.exe
  441. *arm64.exe
  442. *.asc
  443. allowlist-msi-x64:
  444. uses: ./.github/workflows/av-whitelist.yml
  445. needs: [ publish ]
  446. with:
  447. url: ${{ needs.publish.outputs.download-url-msi-x64 }}
  448. secrets: inherit
  449. allowlist-msi-arm64:
  450. uses: ./.github/workflows/av-whitelist.yml
  451. needs: [ publish ]
  452. with:
  453. url: ${{ needs.publish.outputs.download-url-msi-arm64 }}
  454. secrets: inherit
  455. allowlist-exe-x64:
  456. uses: ./.github/workflows/av-whitelist.yml
  457. needs: [ publish, allowlist-msi-x64 ]
  458. with:
  459. url: ${{ needs.publish.outputs.download-url-exe-x64 }}
  460. secrets: inherit
  461. allowlist-exe-arm64:
  462. uses: ./.github/workflows/av-whitelist.yml
  463. needs: [ publish, allowlist-msi-arm64 ]
  464. with:
  465. url: ${{ needs.publish.outputs.download-url-exe-arm64 }}
  466. secrets: inherit
  467. notify-winget:
  468. name: Notify for winget-release
  469. if: needs.get-version.outputs.versionType == 'stable'
  470. needs: [publish, get-version]
  471. runs-on: ubuntu-latest
  472. steps:
  473. - name: Slack Notification
  474. uses: rtCamp/action-slack-notify@v2
  475. env:
  476. SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
  477. SLACK_USERNAME: 'Cryptobot'
  478. SLACK_ICON: false
  479. SLACK_ICON_EMOJI: ':bot:'
  480. SLACK_CHANNEL: 'cryptomator-desktop'
  481. SLACK_TITLE: "MSI packages of ${{ github.event.repository.name }} ${{ github.event.release.tag_name }} published."
  482. SLACK_MESSAGE: "Ready to <https://github.com/${{ github.repository }}/actions/workflows/winget.yml| release them to winget>."
  483. SLACK_FOOTER: false
  484. MSG_MINIMAL: true