release.yml 21 KB

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