release.yml 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631
  1. name: Installers and Release
  2. on:
  3. workflow_dispatch:
  4. inputs:
  5. semver:
  6. description: 'SemVer'
  7. required: true
  8. default: '0.99.99-SNAPSHOT'
  9. push:
  10. tags: # see https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet
  11. - '[0-9]+.[0-9]+.[0-9]+'
  12. - '[0-9]+.[0-9]+.[0-9]+-*'
  13. env:
  14. JAVA_VERSION: 17
  15. defaults:
  16. run:
  17. shell: bash
  18. jobs:
  19. #
  20. # Buildkit
  21. #
  22. buildkit:
  23. name: Build ${{ matrix.profile }}-buildkit
  24. runs-on: ${{ matrix.os }}
  25. strategy:
  26. fail-fast: true
  27. matrix:
  28. include:
  29. - os: ubuntu-latest
  30. profile: linux
  31. - os: windows-latest
  32. profile: win
  33. - os: macos-latest
  34. profile: mac
  35. steps:
  36. - uses: actions/checkout@v2
  37. - uses: actions/setup-java@v1
  38. with:
  39. java-version: ${{ env.JAVA_VERSION }}
  40. - uses: actions/cache@v2
  41. with:
  42. path: ~/.m2/repository
  43. key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
  44. restore-keys: |
  45. ${{ runner.os }}-maven-
  46. - name: Ensure to use tagged version
  47. run: mvn versions:set -DnewVersion=${GITHUB_REF##*/} # use shell parameter expansion to strip of 'refs/tags'
  48. if: startsWith(github.ref, 'refs/tags/')
  49. - name: Build and Test
  50. run: mvn -B clean package -Pdependency-check,${{ matrix.profile }}
  51. - name: Patch buildkit
  52. run: |
  53. cp LICENSE.txt target
  54. cp dist/${{ matrix.profile }}/launcher* target
  55. cp target/cryptomator-*.jar target/mods
  56. - name: Upload ${{ matrix.profile }}-buildkit
  57. uses: actions/upload-artifact@v2
  58. with:
  59. name: ${{ matrix.profile }}-buildkit
  60. path: |
  61. target/libs
  62. target/mods
  63. target/LICENSE.txt
  64. target/launcher*
  65. if-no-files-found: error
  66. #
  67. # Release Metadata
  68. #
  69. metadata:
  70. name: Determine Version Metadata
  71. runs-on: ubuntu-latest
  72. outputs:
  73. semVerNum: ${{ steps.versions.outputs.semVerNum }}
  74. semVerStr: ${{ steps.versions.outputs.semVerStr }}
  75. ppaVerStr: ${{ steps.versions.outputs.ppaVerStr }}
  76. revNum: ${{ steps.versions.outputs.revNum }}
  77. steps:
  78. - uses: actions/checkout@v2
  79. with:
  80. fetch-depth: 0
  81. - id: versions
  82. run: |
  83. if [[ $GITHUB_REF == refs/tags/* ]]; then
  84. SEM_VER_STR=${GITHUB_REF##*/}
  85. else
  86. SEM_VER_STR=${{ github.event.inputs.semver }}
  87. fi
  88. SEM_VER_NUM=`echo ${SEM_VER_STR} | sed -E 's/([0-9]+\.[0-9]+\.[0-9]+).*/\1/'`
  89. REVCOUNT=`git rev-list --count HEAD`
  90. echo "::set-output name=semVerStr::${SEM_VER_STR}"
  91. echo "::set-output name=semVerNum::${SEM_VER_NUM}"
  92. echo "::set-output name=ppaVerStr::${SEM_VER_STR/-/\~}-${REVCOUNT}"
  93. echo "::set-output name=revNum::${REVCOUNT}"
  94. - uses: skymatic/semver-validation-action@v1
  95. with:
  96. version: ${{ steps.versions.outputs.semVerStr }}
  97. #
  98. # Application Directory
  99. #
  100. appdir:
  101. name: Create ${{ matrix.profile }}-appdir
  102. needs: [buildkit, metadata]
  103. runs-on: ${{ matrix.os }}
  104. strategy:
  105. fail-fast: true
  106. matrix:
  107. include:
  108. - os: ubuntu-latest
  109. profile: linux
  110. jpackageoptions: >
  111. --app-version "${{ needs.metadata.outputs.semVerNum }}.${{ needs.metadata.outputs.revNum }}"
  112. --java-options "-Dfile.encoding=\"utf-8\""
  113. --java-options "-Dcryptomator.logDir=\"~/.local/share/Cryptomator/logs\""
  114. --java-options "-Dcryptomator.pluginDir=\"~/.local/share/Cryptomator/plugins\""
  115. --java-options "-Dcryptomator.settingsPath=\"~/.config/Cryptomator/settings.json:~/.Cryptomator/settings.json\""
  116. --java-options "-Dcryptomator.ipcSocketPath=\"~/.config/Cryptomator/ipc.socket\""
  117. --java-options "-Dcryptomator.p12Path=\"~/.config/Cryptomator/key.p12\""
  118. --java-options "-Dcryptomator.mountPointsDir=\"~/.local/share/Cryptomator/mnt\""
  119. --java-options "-Dcryptomator.showTrayIcon=false"
  120. --java-options "-Dcryptomator.buildNumber=\"appimage-${{ needs.metadata.outputs.revNum }}\""
  121. --resource-dir dist/linux/resources
  122. - os: windows-latest
  123. profile: win
  124. jpackageoptions: >
  125. --app-version "${{ needs.metadata.outputs.semVerNum }}.${{ needs.metadata.outputs.revNum }}"
  126. --java-options "-Dfile.encoding=\"utf-8\""
  127. --java-options "-Dcryptomator.logDir=\"~/AppData/Roaming/Cryptomator\""
  128. --java-options "-Dcryptomator.pluginDir=\"~/AppData/Roaming/Cryptomator/Plugins\""
  129. --java-options "-Dcryptomator.settingsPath=\"~/AppData/Roaming/Cryptomator/settings.json\""
  130. --java-options "-Dcryptomator.ipcSocketPath=\"~/AppData/Roaming/Cryptomator/ipc.socket\""
  131. --java-options "-Dcryptomator.p12Path=\"~/AppData/Roaming/Cryptomator/key.p12\""
  132. --java-options "-Dcryptomator.keychainPath=\"~/AppData/Roaming/Cryptomator/keychain.json\""
  133. --java-options "-Dcryptomator.mountPointsDir=\"~/Cryptomator\""
  134. --java-options "-Dcryptomator.showTrayIcon=true"
  135. --java-options "-Dcryptomator.buildNumber=\"msi-${{ needs.metadata.outputs.revNum }}\""
  136. --resource-dir dist/win/resources
  137. --icon dist/win/resources/Cryptomator.ico
  138. - os: macos-latest
  139. profile: mac
  140. jpackageoptions: >
  141. --app-version "${{ needs.metadata.outputs.semVerNum }}"
  142. --java-options "-Dfile.encoding=\"utf-8\""
  143. --java-options "-Dapple.awt.enableTemplateImages=true"
  144. --java-options "-Dcryptomator.logDir=\"~/Library/Logs/Cryptomator\""
  145. --java-options "-Dcryptomator.pluginDir=\"~/Library/Application Support/Cryptomator/Plugins\""
  146. --java-options "-Dcryptomator.settingsPath=\"~/Library/Application Support/Cryptomator/settings.json\""
  147. --java-options "-Dcryptomator.ipcSocketPath=\"~/Library/Application Support/Cryptomator/ipc.socket\""
  148. --java-options "-Dcryptomator.p12Path=\"~/Library/Application Support/Cryptomator/key.p12\""
  149. --java-options "-Dcryptomator.showTrayIcon=true"
  150. --java-options "-Dcryptomator.buildNumber=\"dmg-${{ needs.metadata.outputs.revNum }}\""
  151. --mac-package-identifier org.cryptomator
  152. --resource-dir dist/mac/resources
  153. steps:
  154. - uses: actions/checkout@v2
  155. - uses: actions/setup-java@v1
  156. with:
  157. java-version: ${{ env.JAVA_VERSION }}
  158. - name: Download ${{ matrix.profile }}-buildkit
  159. uses: actions/download-artifact@v2
  160. with:
  161. name: ${{ matrix.profile }}-buildkit
  162. path: buildkit
  163. - name: Create Runtime Image
  164. run: >
  165. ${JAVA_HOME}/bin/jlink
  166. --verbose
  167. --output runtime
  168. --module-path "${JAVA_HOME}/jmods"
  169. --add-modules java.base,java.desktop,java.instrument,java.logging,java.naming,java.net.http,java.scripting,java.sql,java.xml,jdk.unsupported,jdk.crypto.ec,jdk.accessibility
  170. --no-header-files
  171. --no-man-pages
  172. --strip-debug
  173. --compress=1
  174. - name: Create App Directory
  175. run: >
  176. ${JAVA_HOME}/bin/jpackage
  177. --verbose
  178. --type app-image
  179. --runtime-image runtime
  180. --input buildkit/libs
  181. --module-path buildkit/mods
  182. --module org.cryptomator.desktop/org.cryptomator.launcher.Cryptomator
  183. --dest appdir
  184. --name Cryptomator
  185. --vendor "Skymatic GmbH"
  186. --copyright "(C) 2016 - 2021 Skymatic GmbH"
  187. --java-options "-Xss5m"
  188. --java-options "-Xmx256m"
  189. --java-options "-Dcryptomator.appVersion=\"${{ needs.metadata.outputs.semVerStr }}\""
  190. ${{ matrix.jpackageoptions }}
  191. - name: Create appdir.tar
  192. run: tar -cvf appdir.tar appdir
  193. - name: Upload ${{ matrix.profile }}-appdir
  194. uses: actions/upload-artifact@v2
  195. with:
  196. name: ${{ matrix.profile }}-appdir
  197. path: appdir.tar
  198. if-no-files-found: error
  199. #
  200. # Linux PPA Source Package
  201. #
  202. ppa:
  203. name: Upload source package to PPA
  204. needs: [buildkit, metadata]
  205. runs-on: ubuntu-latest
  206. steps:
  207. - uses: actions/checkout@v2
  208. - name: install build tools
  209. run: |
  210. sudo apt-get update
  211. sudo apt-get install debhelper devscripts dput
  212. - name: Download linux-buildkit
  213. uses: actions/download-artifact@v2
  214. with:
  215. name: linux-buildkit
  216. path: pkgdir
  217. - name: create orig.tar.gz
  218. run: tar -cJf cryptomator_${{ needs.metadata.outputs.ppaVerStr }}.orig.tar.xz -C pkgdir .
  219. - name: patch and rename pkgdir
  220. run: |
  221. cp -r dist/linux/debian/ pkgdir
  222. cp -r dist/linux/resources/ pkgdir
  223. export RFC2822_TIMESTAMP=`date --rfc-2822`
  224. envsubst '${VERSION_STR} ${VERSION_NUM} ${REVISION_NUM}' < dist/linux/debian/rules > pkgdir/debian/rules
  225. envsubst '${VERSION_STR}' < dist/linux/debian/org.cryptomator.Cryptomator.desktop > pkgdir/debian/org.cryptomator.Cryptomator.desktop
  226. envsubst '${PPA_VERSION} ${RFC2822_TIMESTAMP}' < dist/linux/debian/changelog > pkgdir/debian/changelog
  227. find . -name "*.jar" >> pkgdir/debian/source/include-binaries
  228. mv pkgdir cryptomator_${{ needs.metadata.outputs.ppaVerStr }}
  229. env:
  230. VERSION_STR: ${{ needs.metadata.outputs.semVerStr }}
  231. VERSION_NUM: ${{ needs.metadata.outputs.semVerNum }}
  232. REVISION_NUM: ${{ needs.metadata.outputs.revNum }}
  233. PPA_VERSION: ${{ needs.metadata.outputs.ppaVerStr }}-0ppa1
  234. - name: import gpg key 615D449FE6E6A235
  235. run: |
  236. echo "${GPG_PRIVATE_KEY}" | gpg --batch --quiet --import
  237. echo "${GPG_PASSPHRASE}" | gpg --batch --quiet --passphrase-fd 0 --pinentry-mode loopback -u 615D449FE6E6A235 --dry-run --sign dist/linux/debian/rules
  238. env:
  239. GPG_PRIVATE_KEY: ${{ secrets.RELEASES_GPG_PRIVATE_KEY }}
  240. GPG_PASSPHRASE: ${{ secrets.RELEASES_GPG_PASSPHRASE }}
  241. - name: debuild
  242. run: debuild -S -sa -d
  243. env:
  244. DEBSIGN_PROGRAM: gpg --batch --pinentry-mode loopback
  245. DEBSIGN_KEYID: 615D449FE6E6A235
  246. working-directory: cryptomator_${{ needs.metadata.outputs.ppaVerStr }}
  247. - name: Upload artifacts
  248. uses: actions/upload-artifact@v2
  249. with:
  250. name: linux-deb-source-package
  251. path: |
  252. cryptomator_*.dsc
  253. cryptomator_*.orig.tar.xz
  254. cryptomator_*.debian.tar.xz
  255. cryptomator_*_source.changes
  256. cryptomator_*_source.buildinfo
  257. - name: dput to beta repo
  258. run: dput ppa:sebastian-stenzel/cryptomator-beta cryptomator_${PPA_VERSION}_source.changes
  259. env:
  260. PPA_VERSION: ${{ needs.metadata.outputs.ppaVerStr }}-0ppa1
  261. #
  262. # Linux Cryptomator.AppImage
  263. #
  264. linux-appimage:
  265. name: Build Cryptomator.AppImage
  266. runs-on: ubuntu-latest
  267. needs: [appdir, metadata]
  268. steps:
  269. - uses: actions/checkout@v2
  270. - name: Download linux-appdir
  271. uses: actions/download-artifact@v2
  272. with:
  273. name: linux-appdir
  274. - name: Untar appdir.tar
  275. run: |
  276. tar -xvf appdir.tar
  277. - name: Patch Cryptomator.AppDir
  278. run: |
  279. mv appdir/Cryptomator Cryptomator.AppDir
  280. cp -r dist/linux/appimage/resources/AppDir/* Cryptomator.AppDir/
  281. envsubst '${REVISION_NO} ${SEMVER_STR}' < dist/linux/appimage/resources/AppDir/bin/cryptomator.sh > Cryptomator.AppDir/bin/cryptomator.sh
  282. ln -s usr/share/icons/hicolor/scalable/apps/org.cryptomator.Cryptomator.svg Cryptomator.AppDir/org.cryptomator.Cryptomator.svg
  283. ln -s usr/share/icons/hicolor/scalable/apps/org.cryptomator.Cryptomator.svg Cryptomator.AppDir/Cryptomator.svg
  284. ln -s usr/share/icons/hicolor/scalable/apps/org.cryptomator.Cryptomator.svg Cryptomator.AppDir/.DirIcon
  285. ln -s usr/share/applications/org.cryptomator.Cryptomator.desktop Cryptomator.AppDir/Cryptomator.desktop
  286. ln -s bin/cryptomator.sh Cryptomator.AppDir/AppRun
  287. env:
  288. REVISION_NO: ${{ needs.metadata.outputs.revNum }}
  289. SEMVER_STR: ${{ needs.metadata.outputs.semVerStr }}
  290. - name: Extract libjffi.so # workaround for https://github.com/cryptomator/cryptomator-linux/issues/27
  291. run: |
  292. JFFI_NATIVE_JAR=`ls lib/app/ | grep -e 'jffi-[1-9]\.[0-9]\{1,2\}.[0-9]\{1,2\}-native.jar'`
  293. ${JAVA_HOME}/bin/jar -xf lib/app/${JFFI_NATIVE_JAR} /jni/x86_64-Linux/
  294. mv jni/x86_64-Linux/* lib/app/libjffi.so
  295. working-directory: Cryptomator.AppDir
  296. - name: Download AppImageKit
  297. run: |
  298. curl -L https://github.com/AppImage/AppImageKit/releases/download/13/appimagetool-x86_64.AppImage -o appimagetool.AppImage
  299. chmod +x appimagetool.AppImage
  300. ./appimagetool.AppImage --appimage-extract
  301. - name: Prepare GPG-Agent for signing with key 615D449FE6E6A235
  302. run: |
  303. echo "${GPG_PRIVATE_KEY}" | gpg --batch --quiet --import
  304. echo "${GPG_PASSPHRASE}" | gpg --batch --quiet --passphrase-fd 0 --pinentry-mode loopback -u 615D449FE6E6A235 --dry-run --sign Cryptomator.AppDir/AppRun
  305. env:
  306. GPG_PRIVATE_KEY: ${{ secrets.RELEASES_GPG_PRIVATE_KEY }}
  307. GPG_PASSPHRASE: ${{ secrets.RELEASES_GPG_PASSPHRASE }}
  308. - name: Build AppImage
  309. run: >
  310. ./squashfs-root/AppRun Cryptomator.AppDir cryptomator-${{ needs.metadata.outputs.semVerStr }}-x86_64.AppImage
  311. -u 'gh-releases-zsync|cryptomator|cryptomator|latest|cryptomator-*-x86_64.AppImage.zsync'
  312. --sign --sign-key=615D449FE6E6A235 --sign-args="--batch --pinentry-mode loopback"
  313. - name: Upload AppImage
  314. uses: actions/upload-artifact@v2
  315. with:
  316. name: linux-appimage
  317. path: |
  318. cryptomator-*.AppImage
  319. cryptomator-*.AppImage.zsync
  320. if-no-files-found: error
  321. #
  322. # macOS Cryptomator.app
  323. #
  324. mac-app:
  325. name: Build Cryptomator.app
  326. runs-on: macos-latest
  327. needs: [appdir, metadata]
  328. steps:
  329. - uses: actions/checkout@v2
  330. - name: Download mac-appdir
  331. uses: actions/download-artifact@v2
  332. with:
  333. name: mac-appdir
  334. - name: Untar appdir.tar
  335. run: tar -xvf appdir.tar
  336. - name: Patch Cryptomator.app
  337. run: |
  338. mv appdir/Cryptomator.app Cryptomator.app
  339. mv dist/mac/resources/Cryptomator-Vault.icns Cryptomator.app/Contents/Resources/
  340. sed -i '' "s|###BUNDLE_SHORT_VERSION_STRING###|${VERSION_NO}|g" Cryptomator.app/Contents/Info.plist
  341. sed -i '' "s|###BUNDLE_VERSION###|${REVISION_NO}|g" Cryptomator.app/Contents/Info.plist
  342. env:
  343. VERSION_NO: ${{ needs.metadata.outputs.semVerNum }}
  344. REVISION_NO: ${{ needs.metadata.outputs.revNum }}
  345. - name: Install codesign certificate
  346. env:
  347. CODESIGN_P12_BASE64: ${{ secrets.MACOS_CODESIGN_P12_BASE64 }}
  348. CODESIGN_P12_PW: ${{ secrets.MACOS_CODESIGN_P12_PW }}
  349. CODESIGN_TMP_KEYCHAIN_PW: ${{ secrets.MACOS_CODESIGN_TMP_KEYCHAIN_PW }}
  350. run: |
  351. # create variables
  352. CERTIFICATE_PATH=$RUNNER_TEMP/codesign.p12
  353. KEYCHAIN_PATH=$RUNNER_TEMP/codesign.keychain-db
  354. # import certificate and provisioning profile from secrets
  355. echo -n "$CODESIGN_P12_BASE64" | base64 --decode --output $CERTIFICATE_PATH
  356. # create temporary keychain
  357. security create-keychain -p "$CODESIGN_TMP_KEYCHAIN_PW" $KEYCHAIN_PATH
  358. security set-keychain-settings -lut 900 $KEYCHAIN_PATH
  359. security unlock-keychain -p "$CODESIGN_TMP_KEYCHAIN_PW" $KEYCHAIN_PATH
  360. # import certificate to keychain
  361. security import $CERTIFICATE_PATH -P "$CODESIGN_P12_PW" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
  362. security list-keychain -d user -s $KEYCHAIN_PATH
  363. - name: Codesign
  364. env:
  365. CODESIGN_IDENTITY: ${{ secrets.MACOS_CODESIGN_IDENTITY }}
  366. run: |
  367. find Cryptomator.app/Contents/runtime/Contents/MacOS -name '*.dylib' -exec codesign --force -s ${CODESIGN_IDENTITY} {} \;
  368. for JAR_PATH in `find Cryptomator.app -name "*.jar"`; do
  369. if [[ `unzip -l ${JAR_PATH} | grep '.dylib\|.jnilib'` ]]; then
  370. JAR_FILENAME=$(basename ${JAR_PATH})
  371. OUTPUT_PATH=${JAR_PATH%.*}
  372. echo "Codesigning libs in ${JAR_FILENAME}..."
  373. unzip -q ${JAR_PATH} -d ${OUTPUT_PATH}
  374. find ${OUTPUT_PATH} -name '*.dylib' -exec codesign --force -s ${CODESIGN_IDENTITY} {} \;
  375. find ${OUTPUT_PATH} -name '*.jnilib' -exec codesign --force -s ${CODESIGN_IDENTITY} {} \;
  376. rm ${JAR_PATH}
  377. pushd ${OUTPUT_PATH} > /dev/null
  378. zip -qr ../${JAR_FILENAME} *
  379. popd > /dev/null
  380. rm -r ${OUTPUT_PATH}
  381. fi
  382. done
  383. echo "Codesigning Cryptomator.app..."
  384. codesign --force --deep --entitlements dist/mac/Cryptomator.entitlements -o runtime -s ${CODESIGN_IDENTITY} Cryptomator.app
  385. - name: Clean up codesign certificate
  386. if: ${{ always() }}
  387. run: security delete-keychain $RUNNER_TEMP/codesign.keychain-db
  388. - name: Create app.tar
  389. run: tar -cvf app.tar Cryptomator.app
  390. - name: Upload mac-app
  391. uses: actions/upload-artifact@v2
  392. with:
  393. name: mac-app
  394. path: app.tar
  395. if-no-files-found: error
  396. #
  397. # macOS Cryptomator.dmg
  398. #
  399. mac-dmg:
  400. name: Build Cryptomator.dmg
  401. runs-on: macos-11
  402. needs: [mac-app, metadata]
  403. steps:
  404. - uses: actions/checkout@v2
  405. - name: Download mac-appdir
  406. uses: actions/download-artifact@v2
  407. with:
  408. name: mac-app
  409. - name: Untar app.tar
  410. run: tar -xvf app.tar
  411. - name: Prepare .dmg contents
  412. run: |
  413. mkdir dmg
  414. mv Cryptomator.app dmg
  415. cp dist/mac/dmg/resources/macFUSE.webloc dmg
  416. ls -l dmg
  417. - name: Install create-dmg
  418. run: |
  419. brew install create-dmg
  420. create-dmg --help
  421. - name: Create .dmg
  422. run: >
  423. create-dmg
  424. --volname Cryptomator
  425. --volicon "dist/mac/dmg/resources/Cryptomator-Volume.icns"
  426. --background "dist/mac/dmg/resources/Cryptomator-background.tiff"
  427. --window-pos 400 100
  428. --window-size 640 694
  429. --icon-size 128
  430. --icon "Cryptomator.app" 128 245
  431. --hide-extension "Cryptomator.app"
  432. --icon "macFUSE.webloc" 320 501
  433. --hide-extension "macFUSE.webloc"
  434. --app-drop-link 512 245
  435. --eula "dist/mac/dmg/resources/license.rtf"
  436. --icon ".background" 128 758
  437. --icon ".fseventsd" 320 758
  438. --icon ".VolumeIcon.icns" 512 758
  439. Cryptomator-${VERSION_NO}.dmg dmg
  440. env:
  441. VERSION_NO: ${{ needs.metadata.outputs.semVerNum }}
  442. - name: Install notarization credentials
  443. env:
  444. NOTARIZATION_KEYCHAIN_PROFILE: ${{ secrets.MACOS_NOTARIZATION_KEYCHAIN_PROFILE }}
  445. NOTARIZATION_APPLE_ID: ${{ secrets.MACOS_NOTARIZATION_APPLE_ID }}
  446. NOTARIZATION_PW: ${{ secrets.MACOS_NOTARIZATION_PW }}
  447. NOTARIZATION_TEAM_ID: ${{ secrets.MACOS_NOTARIZATION_TEAM_ID }}
  448. NOTARIZATION_TMP_KEYCHAIN_PW: ${{ secrets.MACOS_NOTARIZATION_TMP_KEYCHAIN_PW }}
  449. run: |
  450. # create temporary keychain
  451. KEYCHAIN_PATH=$RUNNER_TEMP/notarization.keychain-db
  452. security create-keychain -p "${NOTARIZATION_TMP_KEYCHAIN_PW}" ${KEYCHAIN_PATH}
  453. security set-keychain-settings -lut 900 ${KEYCHAIN_PATH}
  454. security unlock-keychain -p "${NOTARIZATION_TMP_KEYCHAIN_PW}" ${KEYCHAIN_PATH}
  455. # import credentials from secrets
  456. sudo xcode-select -s /Applications/Xcode_13.0.app
  457. xcrun notarytool store-credentials "${NOTARIZATION_KEYCHAIN_PROFILE}" --apple-id "${NOTARIZATION_APPLE_ID}" --password "${NOTARIZATION_PW}" --team-id "${NOTARIZATION_TEAM_ID}" --keychain "${KEYCHAIN_PATH}"
  458. - name: Notarize .dmg
  459. env:
  460. NOTARIZATION_KEYCHAIN_PROFILE: ${{ secrets.MACOS_NOTARIZATION_KEYCHAIN_PROFILE }}
  461. run: |
  462. KEYCHAIN_PATH=$RUNNER_TEMP/notarization.keychain-db
  463. sudo xcode-select -s /Applications/Xcode_13.0.app
  464. xcrun notarytool submit Cryptomator-*.dmg --keychain-profile "${NOTARIZATION_KEYCHAIN_PROFILE}" --keychain "${KEYCHAIN_PATH}" --wait
  465. xcrun stapler staple Cryptomator-*.dmg
  466. - name: Clean up notarization credentials
  467. if: ${{ always() }}
  468. run: security delete-keychain $RUNNER_TEMP/notarization.keychain-db
  469. - name: Add possible alpha/beta tags to installer name
  470. run: mv Cryptomator-*.dmg Cryptomator-${{ needs.metadata.outputs.semVerStr }}.dmg
  471. - name: Upload mac-dmg
  472. uses: actions/upload-artifact@v2
  473. with:
  474. name: mac-dmg
  475. path: Cryptomator-*.dmg
  476. if-no-files-found: error
  477. #
  478. # MSI package
  479. #
  480. win-msi:
  481. name: Build Cryptomator.msi
  482. runs-on: windows-latest
  483. needs: [appdir, metadata]
  484. steps:
  485. - uses: actions/checkout@v2
  486. - name: Download win-appdir
  487. uses: actions/download-artifact@v2
  488. with:
  489. name: win-appdir
  490. - name: Untar appdir.tar
  491. run: tar -xvf appdir.tar
  492. - uses: actions/setup-java@v1
  493. with:
  494. java-version: ${{ env.JAVA_VERSION }}
  495. - name: Patch Application Directory
  496. run: |
  497. cp dist/win/contrib/* appdir/Cryptomator
  498. - name: Fix permissions
  499. run: attrib -r appdir/Cryptomator/Cryptomator.exe
  500. shell: pwsh
  501. - name: Codesign
  502. uses: skymatic/code-sign-action@v1
  503. with:
  504. certificate: ${{ secrets.WIN_CODESIGN_P12_BASE64 }}
  505. password: ${{ secrets.WIN_CODESIGN_P12_PW }}
  506. certificatesha1: FF52240075AD7D14AF25629FDF69635357C7D14B
  507. description: Cryptomator
  508. timestampUrl: 'http://timestamp.digicert.com'
  509. folder: appdir/Cryptomator
  510. recursive: true
  511. - name: Create MSI
  512. run: >
  513. ${JAVA_HOME}/bin/jpackage
  514. --verbose
  515. --type msi
  516. --win-upgrade-uuid bda45523-42b1-4cae-9354-a45475ed4775
  517. --app-image appdir/Cryptomator
  518. --dest installer
  519. --name Cryptomator
  520. --vendor "Skymatic GmbH"
  521. --copyright "(C) 2016 - 2021 Skymatic GmbH"
  522. --app-version "${{ needs.metadata.outputs.semVerNum }}"
  523. --win-menu
  524. --win-dir-chooser
  525. --win-shortcut-prompt
  526. --win-update-url "https:\\cryptomator.org"
  527. --win-menu-group Cryptomator
  528. --resource-dir dist/win/resources
  529. --license-file dist/win/resources/license.rtf
  530. --file-associations dist/win/resources/FAvaultFile.properties
  531. env:
  532. JP_WIXWIZARD_RESOURCES: ${{ github.workspace }}/dist/win/resources # requires abs path, used in resources/main.wxs
  533. - name: Codesign MSI
  534. uses: skymatic/code-sign-action@v1
  535. with:
  536. certificate: ${{ secrets.WIN_CODESIGN_P12_BASE64 }}
  537. password: ${{ secrets.WIN_CODESIGN_P12_PW }}
  538. certificatesha1: FF52240075AD7D14AF25629FDF69635357C7D14B
  539. description: Cryptomator Installer
  540. timestampUrl: 'http://timestamp.digicert.com'
  541. folder: installer
  542. - name: Add possible alpha/beta tags to installer name
  543. run: mv installer/Cryptomator-*.msi installer/Cryptomator-${{ needs.metadata.outputs.semVerStr }}-x64.msi
  544. - name: Upload win-msi
  545. uses: actions/upload-artifact@v2
  546. with:
  547. name: win-msi
  548. path: installer/*.msi
  549. if-no-files-found: error
  550. #
  551. # Release
  552. #
  553. release:
  554. name: Draft a release on Github
  555. runs-on: ubuntu-latest
  556. needs: [metadata,linux-appimage,mac-dmg,win-msi,ppa]
  557. if: startsWith(github.ref, 'refs/tags/') && github.repository == 'cryptomator/cryptomator'
  558. steps:
  559. - uses: actions/checkout@v2
  560. - name: Create tarball
  561. run: git archive --prefix="cryptomator-${{ needs.metadata.outputs.semVerStr }}/" -o "cryptomator-${{ needs.metadata.outputs.semVerStr }}.tar.gz" ${{ github.ref }}
  562. - name: Download linux appimage
  563. uses: actions/download-artifact@v2
  564. with:
  565. name: linux-appimage
  566. - name: Download macOS dmg
  567. uses: actions/download-artifact@v2
  568. with:
  569. name: mac-dmg
  570. - name: Download Windows msi
  571. uses: actions/download-artifact@v2
  572. with:
  573. name: win-msi
  574. - name: Create detached GPG signature for all release files with key 615D449FE6E6A235
  575. run: |
  576. echo "${GPG_PRIVATE_KEY}" | gpg --batch --quiet --import
  577. for FILE in `find . -name "*.AppImage" -o -name "*.dmg" -o -name "*.msi" -o -name "*.zsync" -o -name "*.tar.gz"`; do
  578. echo "${GPG_PASSPHRASE}" | gpg --batch --quiet --passphrase-fd 0 --pinentry-mode loopback -u 615D449FE6E6A235 --detach-sign -a ${FILE}
  579. done
  580. env:
  581. GPG_PRIVATE_KEY: ${{ secrets.RELEASES_GPG_PRIVATE_KEY }}
  582. GPG_PASSPHRASE: ${{ secrets.RELEASES_GPG_PASSPHRASE }}
  583. - name: Compute SHA256 checksums of release artifacts
  584. run: |
  585. SHA256_SUMS=`find . -name "*.AppImage" -o -name "*.dmg" -o -name "*.msi" -o -name "*.tar.gz" | xargs sha256sum`
  586. echo "SHA256_SUMS<<EOF" >> $GITHUB_ENV
  587. echo "${SHA256_SUMS}" >> $GITHUB_ENV
  588. echo "EOF" >> $GITHUB_ENV
  589. continue-on-error: true
  590. - name: Create release draft
  591. uses: softprops/action-gh-release@v1
  592. with:
  593. draft: true
  594. fail_on_unmatched_files: true
  595. discussion_category_name: releases
  596. token: ${{ secrets.CRYPTOBOT_RELEASE_TOKEN }}
  597. files: |
  598. *.AppImage
  599. *.zsync
  600. *.asc
  601. *.dmg
  602. *.msi
  603. body: |
  604. :construction: Work in Progress
  605. ## What's new
  606. ## Bugfixes
  607. ## Misc
  608. ---
  609. :scroll: A complete list of closed issues is available [here](LINK)
  610. ---
  611. :floppy_disk: SHA-256 checksums of release artifacts:
  612. ```
  613. ${{ env.SHA256_SUMS }}
  614. ```