release.yml 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529
  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.settingsPath=\"~/.config/Cryptomator/settings.json:~/.Cryptomator/settings.json\""
  104. --java-options "-Dcryptomator.ipcSocketPath=\"~/.config/Cryptomator/ipc.socket\""
  105. --java-options "-Dcryptomator.mountPointsDir=\"~/.local/share/Cryptomator/mnt\""
  106. --java-options "-Dcryptomator.showTrayIcon=false"
  107. --java-options "-Dcryptomator.buildNumber=\"appimage-${{ needs.metadata.outputs.revNum }}\""
  108. --resource-dir dist/linux/resources
  109. - os: windows-latest
  110. profile: win
  111. jpackageoptions: >
  112. --app-version "${{ needs.metadata.outputs.versionNum }}.${{ needs.metadata.outputs.revNum }}"
  113. --java-options "-Dfile.encoding=\"utf-8\""
  114. --java-options "-Dcryptomator.logDir=\"~/AppData/Roaming/Cryptomator\""
  115. --java-options "-Dcryptomator.settingsPath=\"~/AppData/Roaming/Cryptomator/settings.json\""
  116. --java-options "-Dcryptomator.ipcSocketPath=\"~/AppData/Roaming/Cryptomator/ipc.socket\""
  117. --java-options "-Dcryptomator.keychainPath=\"~/AppData/Roaming/Cryptomator/keychain.json\""
  118. --java-options "-Dcryptomator.mountPointsDir=\"~/Cryptomator\""
  119. --java-options "-Dcryptomator.showTrayIcon=true"
  120. --java-options "-Dcryptomator.buildNumber=\"msi-${{ needs.metadata.outputs.revNum }}\""
  121. --resource-dir dist/win/resources
  122. --icon dist/win/resources/Cryptomator.ico
  123. - os: macos-latest
  124. profile: mac
  125. jpackageoptions: >
  126. --app-version "${{ needs.metadata.outputs.versionNum }}"
  127. --java-options "-Dfile.encoding=\"utf-8\""
  128. --java-options "-Dcryptomator.logDir=\"~/Library/Logs/Cryptomator\""
  129. --java-options "-Dcryptomator.settingsPath=\"~/Library/Application Support/Cryptomator/settings.json\""
  130. --java-options "-Dcryptomator.ipcSocketPath=\"~/Library/Application Support/Cryptomator/ipc.socket\""
  131. --java-options "-Dcryptomator.showTrayIcon=true"
  132. --java-options "-Dcryptomator.buildNumber=\"dmg-${{ needs.metadata.outputs.revNum }}\""
  133. --mac-package-identifier org.cryptomator
  134. --resource-dir dist/mac/resources
  135. steps:
  136. - uses: actions/checkout@v2
  137. - uses: actions/setup-java@v1
  138. with:
  139. java-version: ${{ env.JAVA_VERSION }}
  140. - name: Download ${{ matrix.profile }}-buildkit
  141. uses: actions/download-artifact@v2
  142. with:
  143. name: ${{ matrix.profile }}-buildkit
  144. path: buildkit
  145. - name: Create Runtime Image
  146. run: >
  147. ${JAVA_HOME}/bin/jlink
  148. --verbose
  149. --output runtime
  150. --module-path "${JAVA_HOME}/jmods"
  151. --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
  152. --no-header-files
  153. --no-man-pages
  154. --strip-debug
  155. --compress=1
  156. - name: Create App Directory
  157. run: >
  158. ${JAVA_HOME}/bin/jpackage
  159. --verbose
  160. --type app-image
  161. --runtime-image runtime
  162. --input buildkit/libs
  163. --module-path buildkit/mods
  164. --module org.cryptomator.desktop/org.cryptomator.launcher.Cryptomator
  165. --dest appdir
  166. --name Cryptomator
  167. --vendor "Skymatic GmbH"
  168. --copyright "(C) 2016 - 2021 Skymatic GmbH"
  169. --java-options "-Xss5m"
  170. --java-options "-Xmx256m"
  171. ${{ matrix.jpackageoptions }}
  172. - name: Create appdir.tar
  173. run: tar -cvf appdir.tar appdir
  174. - name: Upload ${{ matrix.profile }}-appdir
  175. uses: actions/upload-artifact@v2
  176. with:
  177. name: ${{ matrix.profile }}-appdir
  178. path: appdir.tar
  179. if-no-files-found: error
  180. #
  181. # Linux Cryptomator.AppImage
  182. #
  183. linux-appimage:
  184. name: Build Cryptomator.AppImage
  185. runs-on: ubuntu-latest
  186. needs: [appdir, metadata]
  187. steps:
  188. - uses: actions/checkout@v2
  189. - name: Download linux-appdir
  190. uses: actions/download-artifact@v2
  191. with:
  192. name: linux-appdir
  193. - name: Untar appdir.tar
  194. run: |
  195. tar -xvf appdir.tar
  196. - name: Patch Cryptomator.AppDir
  197. run: |
  198. mv appdir/Cryptomator Cryptomator.AppDir
  199. cp -r dist/linux/appimage/resources/AppDir/* Cryptomator.AppDir/
  200. envsubst '${REVISION_NO}' < dist/linux/appimage/resources/AppDir/bin/cryptomator.sh > Cryptomator.AppDir/bin/cryptomator.sh
  201. ln -s usr/share/icons/hicolor/scalable/apps/org.cryptomator.Cryptomator.svg Cryptomator.AppDir/org.cryptomator.Cryptomator.svg
  202. ln -s usr/share/icons/hicolor/scalable/apps/org.cryptomator.Cryptomator.svg Cryptomator.AppDir/Cryptomator.svg
  203. ln -s usr/share/icons/hicolor/scalable/apps/org.cryptomator.Cryptomator.svg Cryptomator.AppDir/.DirIcon
  204. ln -s usr/share/applications/org.cryptomator.Cryptomator.desktop Cryptomator.AppDir/Cryptomator.desktop
  205. ln -s bin/cryptomator.sh Cryptomator.AppDir/AppRun
  206. env:
  207. REVISION_NO: ${{ needs.metadata.outputs.revNum }}
  208. - name: Extract libjffi.so # workaround for https://github.com/cryptomator/cryptomator-linux/issues/27
  209. run: |
  210. JFFI_NATIVE_JAR=`ls lib/app/ | grep -e 'jffi-[1-9]\.[0-9]\{1,2\}.[0-9]\{1,2\}-native.jar'`
  211. ${JAVA_HOME}/bin/jar -xf lib/app/${JFFI_NATIVE_JAR} /jni/x86_64-Linux/
  212. mv jni/x86_64-Linux/* lib/app/libjffi.so
  213. working-directory: Cryptomator.AppDir
  214. - name: Download AppImageKit
  215. run: |
  216. curl -L https://github.com/AppImage/AppImageKit/releases/download/13/appimagetool-x86_64.AppImage -o appimagetool.AppImage
  217. chmod +x appimagetool.AppImage
  218. ./appimagetool.AppImage --appimage-extract
  219. - name: Prepare GPG-Agent for signing with key 615D449FE6E6A235
  220. run: |
  221. echo "${GPG_PRIVATE_KEY}" | gpg --batch --quiet --import
  222. echo "${GPG_PASSPHRASE}" | gpg --batch --quiet --passphrase-fd 0 --pinentry-mode loopback -u 615D449FE6E6A235 --dry-run --sign Cryptomator.AppDir/AppRun
  223. env:
  224. GPG_PRIVATE_KEY: ${{ secrets.RELEASES_GPG_PRIVATE_KEY }}
  225. GPG_PASSPHRASE: ${{ secrets.RELEASES_GPG_PASSPHRASE }}
  226. - name: Build AppImage
  227. run: >
  228. ./squashfs-root/AppRun Cryptomator.AppDir cryptomator-${{ needs.metadata.outputs.versionStr }}-x86_64.AppImage
  229. -u 'gh-releases-zsync|cryptomator|cryptomator|latest|cryptomator-*-x86_64.AppImage.zsync'
  230. --sign --sign-key=615D449FE6E6A235 --sign-args="--batch --pinentry-mode loopback"
  231. - name: Upload AppImage
  232. uses: actions/upload-artifact@v2
  233. with:
  234. name: linux-appimage
  235. path: |
  236. cryptomator-*.AppImage
  237. cryptomator-*.AppImage.zsync
  238. if-no-files-found: error
  239. #
  240. # macOS Cryptomator.app
  241. #
  242. mac-app:
  243. name: Build Cryptomator.app
  244. runs-on: macos-latest
  245. needs: [appdir, metadata]
  246. steps:
  247. - uses: actions/checkout@v2
  248. - name: Download mac-appdir
  249. uses: actions/download-artifact@v2
  250. with:
  251. name: mac-appdir
  252. - name: Untar appdir.tar
  253. run: tar -xvf appdir.tar
  254. - name: Patch Cryptomator.app
  255. run: |
  256. mv appdir/Cryptomator.app Cryptomator.app
  257. sed -i '' "s|###BUNDLE_SHORT_VERSION_STRING###|${VERSION_NO}|g" Cryptomator.app/Contents/Info.plist
  258. sed -i '' "s|###BUNDLE_VERSION###|${REVISION_NO}|g" Cryptomator.app/Contents/Info.plist
  259. env:
  260. VERSION_NO: ${{ needs.metadata.outputs.versionNum }}
  261. REVISION_NO: ${{ needs.metadata.outputs.revNum }}
  262. - name: Install codesign certificate
  263. env:
  264. CODESIGN_P12_BASE64: ${{ secrets.MACOS_CODESIGN_P12_BASE64 }}
  265. CODESIGN_P12_PW: ${{ secrets.MACOS_CODESIGN_P12_PW }}
  266. CODESIGN_TMP_KEYCHAIN_PW: ${{ secrets.MACOS_CODESIGN_TMP_KEYCHAIN_PW }}
  267. run: |
  268. # create variables
  269. CERTIFICATE_PATH=$RUNNER_TEMP/codesign.p12
  270. KEYCHAIN_PATH=$RUNNER_TEMP/codesign.keychain-db
  271. # import certificate and provisioning profile from secrets
  272. echo -n "$CODESIGN_P12_BASE64" | base64 --decode --output $CERTIFICATE_PATH
  273. # create temporary keychain
  274. security create-keychain -p "$CODESIGN_TMP_KEYCHAIN_PW" $KEYCHAIN_PATH
  275. security set-keychain-settings -lut 900 $KEYCHAIN_PATH
  276. security unlock-keychain -p "$CODESIGN_TMP_KEYCHAIN_PW" $KEYCHAIN_PATH
  277. # import certificate to keychain
  278. security import $CERTIFICATE_PATH -P "$CODESIGN_P12_PW" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
  279. security list-keychain -d user -s $KEYCHAIN_PATH
  280. - name: Codesign
  281. env:
  282. CODESIGN_IDENTITY: ${{ secrets.MACOS_CODESIGN_IDENTITY }}
  283. run: |
  284. find Cryptomator.app/Contents/runtime/Contents/MacOS -name '*.dylib' -exec codesign --force -s ${CODESIGN_IDENTITY} {} \;
  285. for JAR_PATH in `find Cryptomator.app -name "*.jar"`; do
  286. if [[ `unzip -l ${JAR_PATH} | grep '.dylib\|.jnilib'` ]]; then
  287. JAR_FILENAME=$(basename ${JAR_PATH})
  288. OUTPUT_PATH=${JAR_PATH%.*}
  289. echo "Codesigning libs in ${JAR_FILENAME}..."
  290. unzip -q ${JAR_PATH} -d ${OUTPUT_PATH}
  291. find ${OUTPUT_PATH} -name '*.dylib' -exec codesign -s ${CODESIGN_IDENTITY} {} \;
  292. find ${OUTPUT_PATH} -name '*.jnilib' -exec codesign -s ${CODESIGN_IDENTITY} {} \;
  293. rm ${JAR_PATH}
  294. pushd ${OUTPUT_PATH} > /dev/null
  295. zip -qr ../${JAR_FILENAME} *
  296. popd > /dev/null
  297. rm -r ${OUTPUT_PATH}
  298. fi
  299. done
  300. echo "Codesigning Cryptomator.app..."
  301. codesign --force --deep --entitlements dist/mac/Cryptomator.entitlements -o runtime -s ${CODESIGN_IDENTITY} Cryptomator.app
  302. - name: Clean up codesign certificate
  303. if: ${{ always() }}
  304. run: security delete-keychain $RUNNER_TEMP/codesign.keychain-db
  305. - name: Create app.tar
  306. run: tar -cvf app.tar Cryptomator.app
  307. - name: Upload mac-app
  308. uses: actions/upload-artifact@v2
  309. with:
  310. name: mac-app
  311. path: app.tar
  312. if-no-files-found: error
  313. #
  314. # macOS Cryptomator.dmg
  315. #
  316. mac-dmg:
  317. name: Build Cryptomator.dmg
  318. runs-on: macos-11
  319. needs: [mac-app, metadata]
  320. steps:
  321. - uses: actions/checkout@v2
  322. - name: Download mac-appdir
  323. uses: actions/download-artifact@v2
  324. with:
  325. name: mac-app
  326. - name: Untar app.tar
  327. run: tar -xvf app.tar
  328. - name: Prepare .dmg contents
  329. run: |
  330. mkdir dmg
  331. mv Cryptomator.app dmg
  332. cp dist/mac/dmg/resources/macFUSE.webloc dmg
  333. ls -l dmg
  334. - name: Install create-dmg
  335. run: |
  336. brew install create-dmg
  337. create-dmg --help
  338. - name: Create .dmg
  339. run: >
  340. create-dmg
  341. --volname Cryptomator
  342. --volicon "dist/mac/dmg/resources/Cryptomator-Volume.icns"
  343. --background "dist/mac/dmg/resources/Cryptomator-background.tiff"
  344. --window-pos 400 100
  345. --window-size 640 694
  346. --icon-size 128
  347. --icon "Cryptomator.app" 128 245
  348. --hide-extension "Cryptomator.app"
  349. --icon "macFUSE.webloc" 320 501
  350. --hide-extension "macFUSE.webloc"
  351. --app-drop-link 512 245
  352. --eula "dist/mac/dmg/resources/license.rtf"
  353. --icon ".background" 128 758
  354. --icon ".fseventsd" 320 758
  355. --icon ".VolumeIcon.icns" 512 758
  356. Cryptomator-${VERSION_NO}.dmg dmg
  357. env:
  358. VERSION_NO: ${{ needs.metadata.outputs.versionNum }}
  359. - name: Install notarization credentials
  360. env:
  361. NOTARIZATION_KEYCHAIN_PROFILE: ${{ secrets.MACOS_NOTARIZATION_KEYCHAIN_PROFILE }}
  362. NOTARIZATION_APPLE_ID: ${{ secrets.MACOS_NOTARIZATION_APPLE_ID }}
  363. NOTARIZATION_PW: ${{ secrets.MACOS_NOTARIZATION_PW }}
  364. NOTARIZATION_TEAM_ID: ${{ secrets.MACOS_NOTARIZATION_TEAM_ID }}
  365. NOTARIZATION_TMP_KEYCHAIN_PW: ${{ secrets.MACOS_NOTARIZATION_TMP_KEYCHAIN_PW }}
  366. run: |
  367. # create temporary keychain
  368. KEYCHAIN_PATH=$RUNNER_TEMP/notarization.keychain-db
  369. security create-keychain -p "${NOTARIZATION_TMP_KEYCHAIN_PW}" ${KEYCHAIN_PATH}
  370. security set-keychain-settings -lut 900 ${KEYCHAIN_PATH}
  371. security unlock-keychain -p "${NOTARIZATION_TMP_KEYCHAIN_PW}" ${KEYCHAIN_PATH}
  372. # import credentials from secrets
  373. sudo xcode-select -s /Applications/Xcode_13.0.app
  374. xcrun notarytool store-credentials "${NOTARIZATION_KEYCHAIN_PROFILE}" --apple-id "${NOTARIZATION_APPLE_ID}" --password "${NOTARIZATION_PW}" --team-id "${NOTARIZATION_TEAM_ID}" --keychain "${KEYCHAIN_PATH}"
  375. - name: Notarize .dmg
  376. env:
  377. NOTARIZATION_KEYCHAIN_PROFILE: ${{ secrets.MACOS_NOTARIZATION_KEYCHAIN_PROFILE }}
  378. run: |
  379. KEYCHAIN_PATH=$RUNNER_TEMP/notarization.keychain-db
  380. sudo xcode-select -s /Applications/Xcode_13.0.app
  381. xcrun notarytool submit Cryptomator-*.dmg --keychain-profile "${NOTARIZATION_KEYCHAIN_PROFILE}" --keychain "${KEYCHAIN_PATH}" --wait
  382. xcrun stapler staple Cryptomator-*.dmg
  383. - name: Clean up notarization credentials
  384. if: ${{ always() }}
  385. run: security delete-keychain $RUNNER_TEMP/notarization.keychain-db
  386. - name: Upload mac-dmg
  387. uses: actions/upload-artifact@v2
  388. with:
  389. name: mac-dmg
  390. path: Cryptomator-*.dmg
  391. if-no-files-found: error
  392. #
  393. # MSI package
  394. #
  395. win-msi:
  396. name: Build Cryptomator.msi
  397. runs-on: windows-latest
  398. needs: [appdir, metadata]
  399. steps:
  400. - uses: actions/checkout@v2
  401. - name: Download win-appdir
  402. uses: actions/download-artifact@v2
  403. with:
  404. name: win-appdir
  405. - name: Untar appdir.tar
  406. run: tar -xvf appdir.tar
  407. - uses: actions/setup-java@v1
  408. with:
  409. java-version: ${{ env.JAVA_VERSION }}
  410. - name: Patch Application Directory
  411. run: |
  412. cp dist/win/contrib/* appdir/Cryptomator
  413. - name: Fix permissions
  414. run: attrib -r appdir/Cryptomator/Cryptomator.exe
  415. shell: pwsh
  416. - name: Codesign
  417. uses: skymatic/code-sign-action@v1
  418. with:
  419. certificate: ${{ secrets.WIN_CODESIGN_P12_BASE64 }}
  420. password: ${{ secrets.WIN_CODESIGN_P12_PW }}
  421. certificatesha1: FF52240075AD7D14AF25629FDF69635357C7D14B
  422. description: Cryptomator
  423. timestampUrl: 'http://timestamp.digicert.com'
  424. folder: appdir/Cryptomator
  425. recursive: true
  426. - name: Create MSI
  427. run: >
  428. ${JAVA_HOME}/bin/jpackage
  429. --verbose
  430. --type msi
  431. --win-upgrade-uuid bda45523-42b1-4cae-9354-a45475ed4775
  432. --app-image appdir/Cryptomator
  433. --dest installer
  434. --name Cryptomator
  435. --vendor "Skymatic GmbH"
  436. --copyright "(C) 2016 - 2021 Skymatic GmbH"
  437. --app-version "${{ needs.metadata.outputs.versionNum }}"
  438. --win-menu
  439. --win-dir-chooser
  440. --resource-dir dist/win/resources
  441. --license-file dist/win/resources/license.rtf
  442. --file-associations dist/win/resources/FAencryptedData.properties
  443. --file-associations dist/win/resources/FAvaultFile.properties
  444. env:
  445. JP_WIXWIZARD_RESOURCES: ${{ github.workspace }}/dist/win/resources # requires abs path, used in resources/main.wxs
  446. - name: Codesign MSI
  447. uses: skymatic/code-sign-action@v1
  448. with:
  449. certificate: ${{ secrets.WIN_CODESIGN_P12_BASE64 }}
  450. password: ${{ secrets.WIN_CODESIGN_P12_PW }}
  451. certificatesha1: FF52240075AD7D14AF25629FDF69635357C7D14B
  452. description: Cryptomator Installer
  453. timestampUrl: 'http://timestamp.digicert.com'
  454. folder: installer
  455. - name: Upload win-msi
  456. uses: actions/upload-artifact@v2
  457. with:
  458. name: win-msi
  459. path: installer/*.msi
  460. if-no-files-found: error
  461. #
  462. # Release
  463. #
  464. release:
  465. name: Draft a release on Github
  466. runs-on: ubuntu-latest
  467. needs: [metadata,linux-appimage,mac-dmg,win-msi]
  468. if: startsWith(github.ref, 'refs/tags/') && github.repository == 'cryptomator/cryptomator'
  469. steps:
  470. - uses: actions/checkout@v2
  471. - name: Create tarball
  472. run: git archive --prefix="cryptomator-${{ needs.metadata.outputs.versionStr }}/" -o "cryptomator-${{ needs.metadata.outputs.versionStr }}.tar.gz" ${{ github.ref }}
  473. - name: Download linux appimage
  474. uses: actions/download-artifact@v2
  475. with:
  476. name: linux-appimage
  477. - name: Download macOS dmg
  478. uses: actions/download-artifact@v2
  479. with:
  480. name: mac-dmg
  481. - name: Download Windows msi
  482. uses: actions/download-artifact@v2
  483. with:
  484. name: win-msi
  485. - name: Create detached GPG signature for all release files with key 615D449FE6E6A235
  486. run: |
  487. echo "${GPG_PRIVATE_KEY}" | gpg --batch --quiet --import
  488. for FILE in `find . -name "*.AppImage" -o -name "*.dmg" -o -name "*.msi" -o -name "*.zsync" -o -name "*.tar.gz"`; do
  489. echo "${GPG_PASSPHRASE}" | gpg --batch --quiet --passphrase-fd 0 --pinentry-mode loopback -u 615D449FE6E6A235 --detach-sign -a ${FILE}
  490. done
  491. env:
  492. GPG_PRIVATE_KEY: ${{ secrets.RELEASES_GPG_PRIVATE_KEY }}
  493. GPG_PASSPHRASE: ${{ secrets.RELEASES_GPG_PASSPHRASE }}
  494. - name: Create release draft
  495. uses: softprops/action-gh-release@v1
  496. with:
  497. draft: true
  498. fail_on_unmatched_files: true
  499. discussion_category_name: releases
  500. token: ${{ secrets.CRYPTOBOT_RELEASE_TOKEN }}
  501. files: |
  502. *.AppImage
  503. *.zsync
  504. *.asc
  505. *.dmg
  506. *.msi
  507. body: |
  508. :construction: Work in Progress
  509. ## What's new
  510. ## Bugfixes
  511. ## Misc
  512. ---
  513. :scroll: A complete list of closed issues is available [here](LINK)