From 150c57038dc0c0573abf2c280d2d1c8fb8b45bb7 Mon Sep 17 00:00:00 2001 From: Elysia Date: Fri, 30 Jan 2026 22:27:48 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E6=9B=B4=E6=96=B0=E6=9E=84?= =?UTF-8?q?=E5=BB=BA=E9=85=8D=E7=BD=AE=EF=BC=8C=E6=B7=BB=E5=8A=A0=E5=AF=B9?= =?UTF-8?q?=E5=8F=91=E5=B8=83=E4=BA=8B=E4=BB=B6=E7=9A=84=E6=94=AF=E6=8C=81?= =?UTF-8?q?=EF=BC=9B=E6=9B=B4=E6=96=B0=E4=BE=9D=E8=B5=96=E9=A1=B9=E4=BB=A5?= =?UTF-8?q?=E7=A1=AE=E4=BF=9D=E5=85=BC=E5=AE=B9=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 19 ++++++++++++++++++- electron-builder.yml | 6 +++++- scripts/postinst.sh | 2 ++ 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fa549903..9b5de3d8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,6 +3,8 @@ name: Build on: push: branches: [main] + tags: + - "*" paths-ignore: - "**.md" - "**.spec.js" @@ -25,6 +27,11 @@ on: - ".gitignore" - ".github/**" - "!.github/workflows/build.yml" + release: + types: [published, created] + +permissions: + contents: write jobs: build: @@ -78,4 +85,14 @@ jobs: with: name: release_for_${{ matrix.package }} path: release/**/*.${{ matrix.package }} - retention-days: 5 \ No newline at end of file + retention-days: 5 + + - name: Upload to GitHub Release + if: github.event_name == 'release' || startsWith(github.ref, 'refs/tags/') + uses: softprops/action-gh-release@v2 + with: + tag_name: ${{ github.ref_name }} + files: | + release/**/*.deb + release/**/*.rpm + generate_release_notes: true \ No newline at end of file diff --git a/electron-builder.yml b/electron-builder.yml index c8f60e39..5c436f2e 100644 --- a/electron-builder.yml +++ b/electron-builder.yml @@ -41,6 +41,8 @@ deb: - "libuuid1" - "libsecret-1-0" - "apm" + - "xdg-utils" + - "shared-mime-info" rpm: afterInstall: "scripts/postinst.sh" afterRemove: "scripts/postrm.sh" @@ -54,4 +56,6 @@ rpm: - "at-spi2-core" - "libuuid" - "libsecret" - - "amber-package-manager" \ No newline at end of file + - "amber-package-manager" + - "xdg-utils" + - "shared-mime-info" \ No newline at end of file diff --git a/scripts/postinst.sh b/scripts/postinst.sh index d62ccb67..b1895bca 100755 --- a/scripts/postinst.sh +++ b/scripts/postinst.sh @@ -1,3 +1,5 @@ #!/usr/bin/bash cp -fv /opt/apm-app-store/extras/store.spark-app.amber-pm-store.policy /usr/share/polkit-1/actions/store.spark-app.amber-pm-store.policy +xdg-mime default apm-app-store.desktop x-scheme-handler/apmstore +update-mime-database /usr/share/mime || true \ No newline at end of file