build-desktop-release.yml 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733
  1. # This is the main desktop application release workflow for both nightly and beta/stable releases.
  2. name: Build-Desktop-Release
  3. on:
  4. workflow_dispatch:
  5. inputs:
  6. build-target:
  7. description: 'Build Target (Release Type)'
  8. type: choice
  9. required: true
  10. options:
  11. - beta
  12. - nightly
  13. - non-release
  14. default: "non-release"
  15. git-ref:
  16. description: "Release Git Ref (Which branch or tag to build?)"
  17. required: true
  18. default: "master"
  19. is-draft:
  20. description: 'Draft Release? (Beta only, Nightly will always be a non-draft)'
  21. type: boolean
  22. required: true
  23. default: true
  24. is-pre-release:
  25. description: 'Pre Release? (labeled as "PreRelease")'
  26. type: boolean
  27. required: true
  28. default: true
  29. enable-file-sync-production:
  30. description: 'File sync production mode'
  31. type: boolean
  32. required: true
  33. default: true
  34. enable-plugins:
  35. description: 'Build with plugin system support'
  36. type: boolean
  37. required: true
  38. default: true
  39. build-android:
  40. description: 'Build Android App'
  41. type: boolean
  42. required: true
  43. default: true
  44. # schedule: # Every workday at the 2 P.M. (UTC) we run a scheduled nightly build
  45. # - cron: '0 14 * * MON-FRI'
  46. env:
  47. CLOJURE_VERSION: '1.11.1.1413'
  48. NODE_VERSION: '22'
  49. JAVA_VERSION: '11'
  50. jobs:
  51. compile-cljs:
  52. runs-on: ubuntu-22.04
  53. steps:
  54. - name: Check build options
  55. if: ${{ github.event_name == 'workflow_dispatch' && (github.event.inputs.build-target == 'nightly' || github.event.inputs.build-target == 'beta') && github.event.inputs.git-ref != 'master' }}
  56. run: |
  57. echo "::error title=CheckFail::Nightly and Beta Release MUST be built from master"
  58. exit 1
  59. - name: Check out Git repository
  60. uses: actions/checkout@v4
  61. with:
  62. ref: ${{ github.event.inputs.git-ref }}
  63. - name: Install Node.js, NPM and Yarn
  64. uses: actions/setup-node@v4
  65. with:
  66. node-version: ${{ env.NODE_VERSION }}
  67. - name: Get yarn cache directory path
  68. id: yarn-cache-dir-path
  69. run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
  70. - name: Cache yarn cache directory
  71. uses: actions/cache@v4
  72. id: yarn-cache
  73. with:
  74. path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
  75. key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
  76. restore-keys: |
  77. ${{ runner.os }}-yarn-
  78. - name: Setup Java JDK
  79. uses: actions/setup-java@v4
  80. with:
  81. distribution: 'zulu'
  82. java-version: ${{ env.JAVA_VERSION }}
  83. - name: Cache clojure deps
  84. uses: actions/cache@v4
  85. with:
  86. path: |
  87. ~/.m2/repository
  88. ~/.gitlibs
  89. key: ${{ runner.os }}-clojure-lib-${{ hashFiles('**/deps.edn') }}
  90. - name: Setup clojure
  91. uses: DeLaGuardo/[email protected]
  92. with:
  93. cli: ${{ env.CLOJURE_VERSION }}
  94. - name: Retrieve tag version
  95. id: ref
  96. run: |
  97. pkgver=$(node ./scripts/get-pkg-version.js "${{ github.event.inputs.build-target }}")
  98. echo "version=$pkgver" >> $GITHUB_OUTPUT
  99. - name: Do Not Overwrite Existing Release
  100. if: ${{ github.event.inputs.build-target == 'beta' }}
  101. run: |
  102. if curl -f "https://api.github.com/repos/${{ github.repository }}/releases/tags/${{ steps.ref.outputs.version }}" &>/dev/null; then
  103. echo "::error title=CheckFail::Release already exists"
  104. exit 1
  105. fi
  106. - name: Update Nightly APP Version
  107. if: ${{ github.event.inputs.build-target == 'nightly' || github.event_name == 'schedule' }}
  108. run: |
  109. sed -i 's/defonce version ".*"/defonce version "${{ steps.ref.outputs.version }}"/g' src/main/frontend/version.cljs
  110. - name: Set Build Environment Variables (only when workflow_dispatch)
  111. if: ${{ github.event_name == 'workflow_dispatch' }}
  112. # if scheduled, use default settings
  113. run: |
  114. echo "ENABLE_PLUGINS=${{ github.event_name == 'schedule' || github.event.inputs.enable-plugins == 'true' }}" >> $GITHUB_ENV
  115. echo "ENABLE_FILE_SYNC_PRODUCTION=${{ github.event_name == 'schedule' || github.event.inputs.enable-file-sync-production == 'true' }}" >> $GITHUB_ENV
  116. - name: Compile CLJS
  117. run: yarn install && gulp build && yarn cljs:release-electron && yarn webpack-app-build
  118. env:
  119. LOGSEQ_SENTRY_DSN: ${{ secrets.LOGSEQ_SENTRY_DSN }}
  120. LOGSEQ_POSTHOG_TOKEN: ${{ secrets.LOGSEQ_POSTHOG_TOKEN }}
  121. - name: Update APP Version
  122. run: |
  123. sed -i 's/"version": "0.0.1"/"version": "${{ steps.ref.outputs.version }}"/g' ./package.json
  124. working-directory: ./static
  125. - name: Display Package.json
  126. run: cat ./package.json
  127. working-directory: ./static
  128. - name: Save VERSION file
  129. run: echo "${{ steps.ref.outputs.version }}" > ./VERSION
  130. working-directory: ./static
  131. - name: List Files
  132. run: ls -al
  133. working-directory: ./static
  134. - name: Upload Sentry Sourcemaps (beta only)
  135. # if: ${{ github.repository == 'logseq/logseq' && github.event_name == 'workflow_dispatch' && github.event.inputs.build-target == 'beta' }}
  136. run: |
  137. curl -sL https://sentry.io/get-cli/ | SENTRY_CLI_VERSION=2.58.4 bash
  138. release_name="logseq@${{ steps.ref.outputs.version }}"
  139. sentry-cli releases new "${release_name}"
  140. sentry-cli releases files "${release_name}" upload-sourcemaps --ext map --ext js ./static/js --url-prefix '~/static/js'
  141. sentry-cli releases finalize "${release_name}"
  142. env:
  143. SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
  144. SENTRY_ORG: logseq
  145. SENTRY_PROJECT: logseq
  146. - name: Cache Static File
  147. uses: actions/upload-artifact@v4
  148. with:
  149. name: static
  150. path: static
  151. build-linux-x64:
  152. runs-on: ubuntu-22.04
  153. needs: [ compile-cljs ]
  154. steps:
  155. - name: Download The Static Asset
  156. uses: actions/download-artifact@v4
  157. with:
  158. name: static
  159. path: static
  160. - name: Retrieve tag version
  161. id: ref
  162. run: |
  163. pkgver=$(cat ./static/VERSION)
  164. echo "version=$pkgver" >> $GITHUB_OUTPUT
  165. - name: Install Node.js, NPM and Yarn
  166. uses: actions/setup-node@v4
  167. with:
  168. node-version: ${{ env.NODE_VERSION }}
  169. # - name: Cache Node Modules
  170. # uses: actions/cache@v4
  171. # with:
  172. # path: |
  173. # **/node_modules
  174. # key: ${{ runner.os }}-node-modules
  175. - name: Build/Release Electron App
  176. run: yarn install && yarn electron:make
  177. working-directory: ./static
  178. - name: Save artifacts
  179. run: |
  180. mkdir -p builds
  181. # NOTE: save VERSION file to builds directory
  182. cp static/VERSION ./builds/VERSION
  183. mv static/out/make/*-*.AppImage ./builds/Logseq-linux-x64-${{ steps.ref.outputs.version }}.AppImage
  184. mv static/out/make/zip/linux/x64/*-linux-x64-*.zip ./builds/Logseq-linux-x64-${{ steps.ref.outputs.version }}.zip
  185. - name: Upload Artifact
  186. uses: actions/upload-artifact@v4
  187. with:
  188. name: logseq-linux-x64-builds
  189. path: builds
  190. build-linux-arm64:
  191. runs-on: ubuntu-22.04
  192. needs: [ compile-cljs ]
  193. steps:
  194. - name: Download The Static Asset
  195. uses: actions/download-artifact@v4
  196. with:
  197. name: static
  198. path: static
  199. - name: Retrieve tag version
  200. id: ref
  201. run: |
  202. pkgver=$(cat ./static/VERSION)
  203. echo "version=$pkgver" >> $GITHUB_OUTPUT
  204. - name: Install Node.js, NPM and Yarn
  205. uses: actions/setup-node@v4
  206. with:
  207. node-version: ${{ env.NODE_VERSION }}
  208. - name: Fetch deps
  209. env:
  210. npm_config_arch: arm64
  211. run: |
  212. yarn install --target_arch=arm64 --target_platform=linux
  213. working-directory: ./static
  214. - name: Build/Release Electron App
  215. run: yarn electron:make-linux-arm64
  216. working-directory: ./static
  217. - name: Save artifacts
  218. run: |
  219. mkdir -p builds
  220. # NOTE: save VERSION file to builds directory
  221. cp static/VERSION ./builds/VERSION
  222. # mv static/out/make/*-*.AppImage ./builds/Logseq-linux-arm64-${{ steps.ref.outputs.version }}.AppImage
  223. mv static/out/make/zip/linux/arm64/*-linux-arm64-*.zip ./builds/Logseq-linux-arm64-${{ steps.ref.outputs.version }}.zip
  224. - name: Upload Artifact
  225. uses: actions/upload-artifact@v4
  226. with:
  227. name: logseq-linux-arm64-builds
  228. path: builds
  229. build-windows-x64:
  230. runs-on: windows-latest
  231. needs: [ compile-cljs ]
  232. steps:
  233. - name: Download The Static Asset
  234. uses: actions/download-artifact@v4
  235. with:
  236. name: static
  237. path: static
  238. - name: Retrieve tag version
  239. id: ref
  240. run: echo "version=$(cat ./static/VERSION)" >> $env:GITHUB_OUTPUT
  241. - name: Install Node.js, NPM and Yarn
  242. uses: actions/setup-node@v4
  243. with:
  244. node-version: ${{ env.NODE_VERSION }}
  245. # - name: Cache Node Modules
  246. # uses: actions/cache@v4
  247. # with:
  248. # path: |
  249. # **/node_modules
  250. # key: ${{ runner.os }}-node-modules
  251. - name: Deps Electron app
  252. run: yarn install
  253. working-directory: ./static
  254. - name: Build/Release Electron app
  255. run: yarn electron:make
  256. working-directory: ./static
  257. env:
  258. DEBUG: electron-packager
  259. - name: Save Artifact
  260. run: |
  261. mkdir builds
  262. mv static\out\make\squirrel.windows\x64\*.nupkg builds\Logseq-win-x64-${{ steps.ref.outputs.version }}-full.nupkg
  263. mv static\out\make\squirrel.windows\x64\*.exe builds\Logseq-win-x64-${{ steps.ref.outputs.version }}.exe
  264. mv static\out\make\zip\win32\x64\*.zip builds\Logseq-win-x64-${{ steps.ref.outputs.version }}.zip
  265. mv static\out\make\wix\x64\Logseq.msi builds\Logseq-win-x64-${{ steps.ref.outputs.version }}.msi
  266. mv static\out\make\squirrel.windows\x64\RELEASES builds\RELEASES
  267. - name: Sign
  268. uses: azure/[email protected]
  269. with:
  270. azure-tenant-id: ${{ secrets.AZURE_TENANT_ID }}
  271. azure-client-id: ${{ secrets.AZURE_CLIENT_ID }}
  272. azure-client-secret: ${{ secrets.AZURE_CLIENT_SECRET }}
  273. endpoint: https://eus.codesigning.azure.net/
  274. trusted-signing-account-name: logseqwin
  275. certificate-profile-name: Logseq
  276. files-folder: builds
  277. files-folder-filter: exe,msi
  278. file-digest: SHA256
  279. timestamp-rfc3161: http://timestamp.acs.microsoft.com
  280. timestamp-digest: SHA256
  281. - name: Upload Artifact
  282. uses: actions/upload-artifact@v4
  283. with:
  284. name: logseq-win-x64-builds
  285. path: builds
  286. build-windows-arm64:
  287. runs-on: windows-latest
  288. needs: [ compile-cljs ]
  289. steps:
  290. - name: Download The Static Asset
  291. uses: actions/download-artifact@v4
  292. with:
  293. name: static
  294. path: static
  295. - name: Retrieve tag version
  296. id: ref
  297. run: echo "version=$(cat ./static/VERSION)" >> $env:GITHUB_OUTPUT
  298. - name: Install Node.js, NPM and Yarn
  299. uses: actions/setup-node@v4
  300. with:
  301. node-version: ${{ env.NODE_VERSION }}
  302. # - name: Cache Node Modules
  303. # uses: actions/cache@v4
  304. # with:
  305. # path: |
  306. # **/node_modules
  307. # key: ${{ runner.os }}-node-modules
  308. - name: Deps Electron app
  309. run: yarn install
  310. working-directory: ./static
  311. - name: Build/Release Electron app
  312. run: yarn electron:make-win-arm64
  313. working-directory: ./static
  314. env:
  315. DEBUG: electron-packager
  316. - name: Save Artifact
  317. run: |
  318. mkdir builds
  319. mv static\out\make\squirrel.windows\arm64\*.nupkg builds\Logseq-win-arm64-${{ steps.ref.outputs.version }}-full.nupkg
  320. mv static\out\make\squirrel.windows\arm64\*.exe builds\Logseq-win-arm64-${{ steps.ref.outputs.version }}.exe
  321. mv static\out\make\zip\win32\arm64\*.zip builds\Logseq-win-arm64-${{ steps.ref.outputs.version }}.zip
  322. mv static\out\make\wix\arm64\Logseq.msi builds\Logseq-win-arm64-${{ steps.ref.outputs.version }}.msi
  323. mv static\out\make\squirrel.windows\arm64\RELEASES builds\RELEASES
  324. - name: Sign
  325. uses: azure/[email protected]
  326. with:
  327. azure-tenant-id: ${{ secrets.AZURE_TENANT_ID }}
  328. azure-client-id: ${{ secrets.AZURE_CLIENT_ID }}
  329. azure-client-secret: ${{ secrets.AZURE_CLIENT_SECRET }}
  330. endpoint: https://eus.codesigning.azure.net/
  331. trusted-signing-account-name: logseqwin
  332. certificate-profile-name: Logseq
  333. files-folder: builds
  334. files-folder-filter: exe,msi
  335. file-digest: SHA256
  336. timestamp-rfc3161: http://timestamp.acs.microsoft.com
  337. timestamp-digest: SHA256
  338. - name: Upload Artifact
  339. uses: actions/upload-artifact@v4
  340. with:
  341. name: logseq-win-arm64-builds
  342. path: builds
  343. build-macos-x64:
  344. needs: [ compile-cljs ]
  345. runs-on: macos-15-intel
  346. steps:
  347. - name: Download The Static Asset
  348. uses: actions/download-artifact@v4
  349. with:
  350. name: static
  351. path: static
  352. - name: Retrieve tag version
  353. id: ref
  354. run: |
  355. pkgver=$(cat ./static/VERSION)
  356. echo "version=$pkgver" >> $GITHUB_OUTPUT
  357. - name: List Static Files
  358. run: ls -al ./static
  359. - name: Install Node.js, NPM and Yarn
  360. uses: actions/setup-node@v4
  361. with:
  362. node-version: ${{ env.NODE_VERSION }}
  363. - name: Install Python
  364. uses: actions/setup-python@v4
  365. with:
  366. python-version: '3.11'
  367. - name: Get yarn cache directory path
  368. id: yarn-cache-dir-path
  369. run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
  370. - name: Cache yarn cache directory
  371. uses: actions/cache@v4
  372. id: yarn-cache
  373. with:
  374. path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
  375. key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
  376. restore-keys: |
  377. ${{ runner.os }}-yarn-
  378. - name: Signing By Apple Developer ID
  379. if: ${{ github.repository == 'logseq/logseq' }}
  380. uses: apple-actions/import-codesign-certs@v1
  381. with:
  382. p12-file-base64: ${{ secrets.APPLE_CERTIFICATES_P12 }}
  383. p12-password: ${{ secrets.APPLE_CERTIFICATES_P12_PASSWORD }}
  384. # - name: Cache Node Modules
  385. # uses: actions/cache@v4
  386. # with:
  387. # path: |
  388. # **/node_modules
  389. # key: ${{ runner.os }}-node-modules
  390. - name: Build/Release Electron App for x64
  391. run: yarn install && yarn rebuild:all && yarn electron:make
  392. working-directory: ./static
  393. env:
  394. APPLE_ID: ${{ secrets.APPLE_ID_EMAIL }}
  395. APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
  396. APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
  397. - name: Save x64 artifacts
  398. run: |
  399. mkdir -p builds
  400. mv static/out/make/Logseq.dmg ./builds/Logseq-darwin-x64-${{ steps.ref.outputs.version }}.dmg
  401. mv static/out/make/zip/darwin/x64/*.zip ./builds/Logseq-darwin-x64-${{ steps.ref.outputs.version }}.zip
  402. - name: Upload Artifact
  403. uses: actions/upload-artifact@v4
  404. with:
  405. name: logseq-darwin-x64-builds
  406. path: builds
  407. build-macos-arm64:
  408. needs: [ compile-cljs ]
  409. runs-on: macos-14
  410. steps:
  411. - name: Download The Static Asset
  412. uses: actions/download-artifact@v4
  413. with:
  414. name: static
  415. path: static
  416. - name: Retrieve tag version
  417. id: ref
  418. run: |
  419. pkgver=$(cat ./static/VERSION)
  420. echo "version=$pkgver" >> $GITHUB_OUTPUT
  421. - name: Install Node.js, NPM and Yarn
  422. uses: actions/setup-node@v4
  423. with:
  424. node-version: ${{ env.NODE_VERSION }}
  425. - name: Get yarn cache directory path
  426. id: yarn-cache-dir-path
  427. run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
  428. - name: Cache yarn cache directory
  429. uses: actions/cache@v4
  430. id: yarn-cache
  431. with:
  432. path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
  433. key: ${{ runner.os }}-arm64-yarn-${{ hashFiles('**/yarn.lock') }}
  434. restore-keys: |
  435. ${{ runner.os }}-arm64-yarn-
  436. - name: Install Python
  437. uses: actions/setup-python@v4
  438. with:
  439. python-version: '3.11'
  440. - name: Signing By Apple Developer ID
  441. if: ${{ github.repository == 'logseq/logseq' }}
  442. uses: apple-actions/import-codesign-certs@v1
  443. with:
  444. p12-file-base64: ${{ secrets.APPLE_CERTIFICATES_P12 }}
  445. p12-password: ${{ secrets.APPLE_CERTIFICATES_P12_PASSWORD }}
  446. # - name: Cache Node Modules
  447. # uses: actions/cache@v4
  448. # with:
  449. # path: |
  450. # **/node_modules
  451. # key: ${{ runner.os }}-node-modules
  452. - name: Fetch deps
  453. run: yarn install --ignore-platform && yarn rebuild:all
  454. working-directory: ./static
  455. - name: Build/Release Electron App for arm64
  456. run: yarn electron:make-macos-arm64
  457. working-directory: ./static
  458. env:
  459. APPLE_ID: ${{ secrets.APPLE_ID_EMAIL }}
  460. APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
  461. APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
  462. - name: Save arm64 artifacts
  463. run: |
  464. mkdir -p builds
  465. mv static/out/make/Logseq.dmg ./builds/Logseq-darwin-arm64-${{ steps.ref.outputs.version }}.dmg
  466. mv static/out/make/zip/darwin/arm64/*.zip ./builds/Logseq-darwin-arm64-${{ steps.ref.outputs.version }}.zip
  467. - name: Upload Artifact
  468. uses: actions/upload-artifact@v4
  469. with:
  470. name: logseq-darwin-arm64-builds
  471. path: builds
  472. # reuse workflow via workflow_call
  473. build-android:
  474. uses: ./.github/workflows/build-android.yml
  475. if: ${{ github.event_name == 'schedule' || github.event.inputs.build-android == 'true' }}
  476. with:
  477. build-target: "${{ github.event.inputs.build-target }}"
  478. # if scheduled, use production mode
  479. enable-file-sync-production: "${{ github.event_name == 'schedule' || github.event.inputs.enable-file-sync-production == 'true' }}"
  480. secrets:
  481. ANDROID_KEYSTORE: "${{ secrets.ANDROID_KEYSTORE }}"
  482. ANDROID_KEYSTORE_PASSWORD: "${{ secrets.ANDROID_KEYSTORE_PASSWORD }}"
  483. SENTRY_AUTH_TOKEN: "${{ secrets.SENTRY_AUTH_TOKEN }}"
  484. nightly-release:
  485. if: ${{ github.event_name == 'schedule' || github.event.inputs.build-target == 'nightly' }}
  486. needs: [ build-macos-x64, build-macos-arm64, build-linux-x64, build-linux-arm64, build-windows-x64, build-windows-arm64 ]
  487. runs-on: ubuntu-22.04
  488. steps:
  489. - name: Download MacOS x64 Artifacts
  490. uses: actions/download-artifact@v4
  491. with:
  492. name: logseq-darwin-x64-builds
  493. path: ./
  494. - name: Download MacOS arm64 Artifacts
  495. uses: actions/download-artifact@v4
  496. with:
  497. name: logseq-darwin-arm64-builds
  498. path: ./
  499. - name: Download The Linux x64 Artifacts
  500. uses: actions/download-artifact@v4
  501. with:
  502. name: logseq-linux-x64-builds
  503. path: ./
  504. - name: Download The Linux arm64 Artifacts
  505. uses: actions/download-artifact@v4
  506. with:
  507. name: logseq-linux-arm64-builds
  508. path: ./
  509. - name: Download The Windows Artifact x64
  510. uses: actions/download-artifact@v4
  511. with:
  512. name: logseq-win-x64-builds
  513. path: ./
  514. - name: Download The Windows Artifact arm64
  515. uses: actions/download-artifact@v4
  516. with:
  517. name: logseq-win-arm64-builds
  518. path: ./
  519. - name: Download Android Artifacts
  520. uses: actions/download-artifact@v4
  521. with:
  522. name: logseq-android-builds
  523. path: ./
  524. - name: Generate SHA256 checksums
  525. run: |
  526. sha256sum *-darwin-* > SHA256SUMS.txt
  527. sha256sum *-win-* >> SHA256SUMS.txt
  528. sha256sum *-linux-* >> SHA256SUMS.txt
  529. sha256sum *.apk >> SHA256SUMS.txt
  530. cat SHA256SUMS.txt
  531. - name: List files
  532. run: ls -rl
  533. - name: Update Nightly Release
  534. uses: andelf/nightly-release@main
  535. env:
  536. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  537. with:
  538. tag_name: nightly
  539. name: 'Desktop app Nightly Release $$'
  540. draft: false
  541. prerelease: ${{ (github.event_name == 'workflow_dispatch' && github.event.inputs.is-pre-release) || (github.event_name == 'schedule')}}
  542. body: |
  543. This is a nightly release of the Logseq desktop app.
  544. It's unstable compared to the official releases, **use it with caution**!
  545. files: |
  546. ./SHA256SUMS.txt
  547. ./*.zip
  548. ./*.dmg
  549. ./*.exe
  550. ./*.msi
  551. ./*.AppImage
  552. ./*.apk
  553. release:
  554. # NOTE: For now, we only have beta channel to be released on Github
  555. if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.build-target == 'beta' }}
  556. needs: [ build-macos-x64, build-macos-arm64, build-linux-x64, build-linux-arm64, build-windows-x64, build-windows-arm64]
  557. runs-on: ubuntu-22.04
  558. steps:
  559. - name: Download MacOS x64 Artifacts
  560. uses: actions/download-artifact@v4
  561. with:
  562. name: logseq-darwin-x64-builds
  563. path: ./
  564. - name: Download MacOS arm64 Artifacts
  565. uses: actions/download-artifact@v4
  566. with:
  567. name: logseq-darwin-arm64-builds
  568. path: ./
  569. - name: Download The Linux x64 Artifacts
  570. uses: actions/download-artifact@v4
  571. with:
  572. name: logseq-linux-x64-builds
  573. path: ./
  574. - name: Download The Linux arm64 Artifacts
  575. uses: actions/download-artifact@v4
  576. with:
  577. name: logseq-linux-arm64-builds
  578. path: ./
  579. - name: Download The Windows Artifact
  580. uses: actions/download-artifact@v4
  581. with:
  582. name: logseq-win-x64-builds
  583. path: ./
  584. - name: Download The Windows Artifact
  585. uses: actions/download-artifact@v4
  586. with:
  587. name: logseq-win-arm64-builds
  588. path: ./
  589. - name: Download Android Artifacts
  590. uses: actions/download-artifact@v4
  591. if: ${{ github.event_name == 'schedule' || github.event.inputs.build-android == 'true' }}
  592. with:
  593. name: logseq-android-builds
  594. path: ./
  595. - name: List files
  596. run: ls -rl
  597. - name: Retrieve tag version
  598. id: ref
  599. run: |
  600. pkgver=$(cat VERSION)
  601. echo "version=$pkgver" >> $GITHUB_OUTPUT
  602. - name: Fix .nupkg name in RELEASES file
  603. run: |
  604. sed -i "s/Logseq-.*.nupkg/Logseq-win-x64-${{ steps.ref.outputs.version }}-full.nupkg/g" RELEASES
  605. - name: Generate SHA256 checksums
  606. run: |
  607. sha256sum *-darwin-* > SHA256SUMS.txt
  608. sha256sum *-win-* >> SHA256SUMS.txt
  609. sha256sum *-linux-* >> SHA256SUMS.txt
  610. sha256sum *.apk >> SHA256SUMS.txt
  611. sha256sum RELEASES >> SHA256SUMS.txt
  612. cat SHA256SUMS.txt
  613. - name: Create Release Draft
  614. uses: softprops/action-gh-release@v1
  615. env:
  616. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  617. with:
  618. tag_name: ${{ steps.ref.outputs.version }}
  619. name: Desktop APP ${{ steps.ref.outputs.version }} (Beta Testing)
  620. body: "TODO: Fill this changelog. Sorry for the inconvenience!"
  621. draft: ${{ github.event.inputs.is-draft }}
  622. prerelease: ${{ github.event.inputs.is-pre-release }}
  623. files: |
  624. ./VERSION
  625. ./SHA256SUMS.txt
  626. ./*.zip
  627. ./*.dmg
  628. ./*.exe
  629. ./*.msi
  630. ./*.nupkg
  631. ./RELEASES
  632. ./*.AppImage
  633. ./*.apk