浏览代码

chore(electron): add appimage format for linux

defclass 4 年之前
父节点
当前提交
615c851d7c
共有 3 个文件被更改,包括 36 次插入5 次删除
  1. 31 5
      .github/workflows/build-desktop-release.yml
  2. 4 0
      resources/forge.config.js
  3. 1 0
      resources/package.json

+ 31 - 5
.github/workflows/build-desktop-release.yml

@@ -110,15 +110,24 @@ jobs:
         run: yarn install --frozen-lockfile && yarn electron:make
         working-directory: ./static
 
-      - name: Change Artifact Name
+      - name: Change Artifact Name For ZIP File
         run: mv static/out/make/zip/linux/x64/Logseq-linux-x64-*.zip  static/out/make/zip/linux/x64/Logseq-linux.zip
 
-      - name: Cache Artifact
+      - name: Change Artifact Name For AppImage File
+        run: mv static/out/make/Logseq-*.AppImage  static/out/make/Logseq-linux.AppImage
+
+      - name: Cache Artifact With ZIP format
         uses: actions/upload-artifact@v1
         with:
           name: Logseq-linux.zip
           path: static/out/make/zip/linux/x64/Logseq-linux.zip
 
+      - name: Cache Artifact With AppImage format
+        uses: actions/upload-artifact@v1
+        with:
+          name: Logseq-linux.AppImage
+          path: static/out/make/Logseq-linux.AppImage
+
   build-windows:
     runs-on: windows-latest
     needs: [ compile-cljs ]
@@ -232,12 +241,18 @@ jobs:
           name: Logseq-x64.zip
           path: ./
 
-      - name: Download The Linux Artifact
+      - name: Download The Linux Artifact In Zip format
         uses: actions/download-artifact@v1
         with:
           name: Logseq-linux.zip
           path: ./
 
+      - name: Download The Linux Artifact In AppImage format
+        uses: actions/download-artifact@v1
+        with:
+          name: Logseq-linux.AppImage
+          path: ./
+
       - name: Download The Windows Artifact
         uses: actions/download-artifact@v1
         with:
@@ -280,8 +295,8 @@ jobs:
           asset_name: logseq-darwin-x64-${{ github.event.inputs.tag-version }}.dmg
           asset_content_type: application/x-apple-diskimage
 
-      - name: Upload Linux Artifact
-        id: upload-linux-artifact
+      - name: Upload Linux Artifact With Zip format
+        id: upload-linux-artifact-with-zip-format
         uses: actions/upload-release-asset@v1
         env:
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -291,6 +306,17 @@ jobs:
           asset_name: logseq-linux-x64-${{ github.event.inputs.tag-version }}.zip
           asset_content_type: application/zip
 
+      - name: Upload Linux Artifact With AppImage format
+        id: upload-linux-artifact-with-appimage-format
+        uses: actions/upload-release-asset@v1
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+        with:
+          upload_url: ${{ steps.create_release.outputs.upload_url }}
+          asset_path: ./Logseq-linux.AppImage
+          asset_name: logseq-linux-x64-${{ github.event.inputs.tag-version }}.AppImage
+          asset_content_type: application/octet-stream
+
       - name: Upload Windows Artifact
         id: upload-win-artifact
         uses: actions/upload-release-asset@v1

+ 4 - 0
resources/forge.config.js

@@ -34,6 +34,10 @@ module.exports = {
     {
       name: '@electron-forge/maker-zip',
       platforms: ['darwin', 'linux']
+    },
+    {
+      name: 'electron-forge-maker-appimage',
+      platforms: ['linux']
     }
   ],
 

+ 1 - 0
resources/package.json

@@ -28,6 +28,7 @@
     "@electron-forge/maker-rpm": "^6.0.0-beta.54",
     "@electron-forge/maker-squirrel": "^6.0.0-beta.54",
     "@electron-forge/maker-zip": "^6.0.0-beta.54",
+    "electron-forge-maker-appimage": "trusktr/electron-forge-maker-appimage#patch-1",
     "electron": "11.2.0"
   }
 }