mirror of
https://gitee.com/spark-store-project/spark-store
synced 2026-04-26 01:10:16 +08:00
feat: 添加对deb和rpm包的构建支持,更新构建依赖和版本信息
This commit is contained in:
22
.github/workflows/build.yml
vendored
22
.github/workflows/build.yml
vendored
@@ -29,12 +29,30 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
container: ${{ matrix.docker_image }}
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest]
|
os: [ubuntu-latest]
|
||||||
|
include:
|
||||||
|
- package: deb
|
||||||
|
docker_image: "debian:12"
|
||||||
|
- package: rpm
|
||||||
|
docker_image: "almalinux:8"
|
||||||
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
- name: Install Build Dependencies
|
||||||
|
if: matrix.package == 'deb'
|
||||||
|
run: |
|
||||||
|
apt-get update
|
||||||
|
apt-get install -y curl git wget build-essential devscripts fakeroot equivs lintian
|
||||||
|
|
||||||
|
- name: Install Build Dependencies
|
||||||
|
if: matrix.package == 'rpm'
|
||||||
|
run: |
|
||||||
|
dnf install -y curl git wget @development-tools rpmdevtools rpmlint
|
||||||
|
|
||||||
- name: Checkout Code
|
- name: Checkout Code
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
@@ -48,13 +66,13 @@ jobs:
|
|||||||
npm install
|
npm install
|
||||||
|
|
||||||
- name: Build Release Files
|
- name: Build Release Files
|
||||||
run: npm run build
|
run: ${{ matrix.package == 'deb' && 'npm run build:deb' || matrix.package == 'rpm' && 'npm run build:rpm' }}
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Upload Artifact
|
- name: Upload Artifact
|
||||||
uses: actions/upload-artifact@v6
|
uses: actions/upload-artifact@v6
|
||||||
with:
|
with:
|
||||||
name: release_on_${{ matrix. os }}
|
name: release_for_${{ matrix.package }}
|
||||||
path: release/
|
path: release/
|
||||||
retention-days: 5
|
retention-days: 5
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
"$schema": "https://raw.githubusercontent.com/electron-userland/electron-builder/master/packages/app-builder-lib/scheme.json",
|
"$schema": "https://raw.githubusercontent.com/electron-userland/electron-builder/master/packages/app-builder-lib/scheme.json",
|
||||||
"appId": "apm-app-store",
|
"appId": "apm-app-store",
|
||||||
"asar": true,
|
"asar": true,
|
||||||
"productName": "APM AppStore",
|
"productName": "apm-app-store",
|
||||||
"directories": {
|
"directories": {
|
||||||
"output": "release/${version}"
|
"output": "release/${version}"
|
||||||
},
|
},
|
||||||
@@ -27,7 +27,8 @@
|
|||||||
},
|
},
|
||||||
"target": [
|
"target": [
|
||||||
"AppImage",
|
"AppImage",
|
||||||
"deb"
|
"deb",
|
||||||
|
"rpm"
|
||||||
],
|
],
|
||||||
"artifactName": "${productName}-Linux-${version}.${ext}"
|
"artifactName": "${productName}-Linux-${version}.${ext}"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ const runCommandCapture = async (execCommand: string, execParams: string[]) => {
|
|||||||
return await new Promise<{ code: number; stdout: string; stderr: string }>((resolve) => {
|
return await new Promise<{ code: number; stdout: string; stderr: string }>((resolve) => {
|
||||||
const child = spawn(execCommand, execParams, {
|
const child = spawn(execCommand, execParams, {
|
||||||
shell: true,
|
shell: true,
|
||||||
|
env: process.env
|
||||||
});
|
});
|
||||||
|
|
||||||
let stdout = '';
|
let stdout = '';
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "apm-app-store",
|
"name": "apm-app-store",
|
||||||
"version": "1.0.0-beta.0",
|
"version": "1.0.0",
|
||||||
"main": "dist-electron/main/index.js",
|
"main": "dist-electron/main/index.js",
|
||||||
"description": "Client for APM App Store",
|
"description": "Client for APM App Store",
|
||||||
"author": "elysia-best <elysia-best@simplelinux.cn.eu.org>",
|
"author": "elysia-best <elysia-best@simplelinux.cn.eu.org>",
|
||||||
@@ -23,6 +23,8 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite --mode debug | pino-pretty",
|
"dev": "vite --mode debug | pino-pretty",
|
||||||
"build": "vue-tsc --noEmit && vite build --mode production && electron-builder",
|
"build": "vue-tsc --noEmit && vite build --mode production && electron-builder",
|
||||||
|
"build:rpm": "vue-tsc --noEmit && vite build --mode production && electron-builder --linux rpm",
|
||||||
|
"build:deb": "vue-tsc --noEmit && vite build --mode production && electron-builder --linux deb",
|
||||||
"preview": "vite preview --mode debug"
|
"preview": "vite preview --mode debug"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
18
store.spark-app.amber-pm-installer.policy
Normal file
18
store.spark-app.amber-pm-installer.policy
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
|
||||||
|
"http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
|
||||||
|
<policyconfig>
|
||||||
|
<vendor>AmberPM</vendor>
|
||||||
|
<icon_name>x-package-repository</icon_name>
|
||||||
|
<action id="store.spark-app.amber-pm-installer">
|
||||||
|
<description>运行amber-pm-installer需要权限</description>
|
||||||
|
<message>要使用amber-pm-installer需要权限</message>
|
||||||
|
<defaults>
|
||||||
|
<allow_any>yes</allow_any>
|
||||||
|
<allow_inactive>yes</allow_inactive>
|
||||||
|
<allow_active>yes</allow_active>
|
||||||
|
</defaults>
|
||||||
|
<annotate key="org.freedesktop.policykit.exec.path">/usr/bin/apm-installer</annotate>
|
||||||
|
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
|
||||||
|
</action>
|
||||||
|
</policyconfig>
|
||||||
Reference in New Issue
Block a user