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