From 5a5c04166006617c0b60a8c934867c38f0985dd7 Mon Sep 17 00:00:00 2001 From: seven Date: Thu, 27 Jun 2024 23:35:20 +0800 Subject: [PATCH] refactor: test build package Signed-off-by: seven --- .github/workflows/release.yml | 21 ++++++++++++++------- package-lock.json | 4 ++-- package.json | 5 +++-- src-tauri/tauri.conf.json | 2 +- src/config/index.ts | 4 ---- 5 files changed, 20 insertions(+), 16 deletions(-) delete mode 100644 src/config/index.ts diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1d786a3..385ad2b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,7 +1,7 @@ name: distributions release on: - push: + pull_request: branches: [master] concurrency: @@ -12,23 +12,29 @@ jobs: pre-release: strategy: matrix: - os: [macos-latest, ubuntu-latest, windows-latest] + include: + - platform: 'macos-latest' + args: '--target universal-apple-darwin' + - platform: 'ubuntu-22.04' # for Tauri v1 you could replace this with ubuntu-20.04. + args: '' + - platform: 'windows-latest' + args: '' node-version: [20.x] - runs-on: ${{ matrix.os }} + runs-on: ${{ matrix.platform }} steps: - name: Github checkout uses: actions/checkout@v4 - name: install Rust stable uses: dtolnay/rust-toolchain@stable - if: matrix.os == 'ubuntu-latest' + if: matrix.platform == 'ubuntu-latest' - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} cache: 'npm' - name: install dependencies (ubuntu only) - if: matrix.os == 'ubuntu-latest' + if: matrix.platform == 'ubuntu-latest' run: | sudo apt-get update sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf @@ -72,13 +78,14 @@ jobs: tagName: ${{ steps.tag_release.outputs.version }} releaseName: ${{ steps.tag_release.outputs.version }} appVersion: "${{ steps.tag_release.outputs.versionNumber }}" + args: ${{ matrix.args }} releaseBody: | ${{ steps.changelog.outputs.compareurl }} ${{ steps.changelog.outputs.changelog }} - releaseDraft: false - prerelease: false + releaseDraft: true + prerelease: true # - name: Distribute artifacts to R2 diff --git a/package-lock.json b/package-lock.json index 161fa7a..0813454 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "dockit", - "version": "0.3.2", + "version": "0.3.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "dockit", - "version": "0.3.2", + "version": "0.3.3", "license": "Apache-2.0", "dependencies": { "@tauri-apps/api": "^1", diff --git a/package.json b/package.json index 5a44463..8098396 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "dockit", "private": true, "type": "module", - "version": "0.3.2", + "version": "0.3.3", "description": "A faster, better and more stable NoSQL desktop tools", "author": "geekfun ", "homepage": "ttps://dockit.geekfun.club", @@ -19,7 +19,8 @@ "lint:fix": "eslint --fix ./", "lint:check": "eslint ./", "test": "jest --runInBand --coverage --coverageReporters json-summary text html lcov", - "test:ci": "jest --runInBand --ci --coverage --coverageReporters json-summary text html lcov" + "test:ci": "jest --runInBand --ci --coverage --coverageReporters json-summary text html lcov", + "build:macos": "tauri build -t universal-apple-darwin" }, "dependencies": { "@tauri-apps/api": "^1", diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 51db82a..e8fed60 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -7,7 +7,7 @@ }, "package": { "productName": "DocKit", - "version": "0.0.0" + "version": "../package.json" }, "tauri": { "allowlist": { diff --git a/src/config/index.ts b/src/config/index.ts deleted file mode 100644 index 74f67ec..0000000 --- a/src/config/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -const env = process.env.NODE_ENV === 'development' ? 'dev' : 'prod'; -const githubLink = 'https://github.com/geek-fun/dockit'; - -export { env, githubLink };