release.yml 23 KB

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