Skip to content

Commit

Permalink
chore: 支持发布预发版和测试版 (#498)
Browse files Browse the repository at this point in the history
  • Loading branch information
ayangweb authored Sep 8, 2024
1 parent a910a66 commit 7b4a4db
Show file tree
Hide file tree
Showing 10 changed files with 256 additions and 254 deletions.
35 changes: 18 additions & 17 deletions .github/workflows/beta_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,35 +6,35 @@ on:
workflow_dispatch:
inputs:
updater:
description: 'Enable updater?'
description: "Enable updater?"
required: true
type: boolean
default: true
platform_windows:
description: 'windows'
description: "windows"
required: true
type: boolean
default: true
platform_linux:
description: 'linux'
description: "linux"
required: true
type: boolean
default: false
platform_macos_aarch64:
description: 'macos-aarch64'
description: "macos-aarch64"
required: true
type: boolean
default: false
platform_macos_x86_64:
description: 'macos-x86_64'
description: "macos-x86_64"
required: true
type: boolean
default: false
retention_days:
description: 'Artifacts retention time (days)'
description: "Artifacts retention time (days)"
required: true
type: string
default: '1'
default: "1"

jobs:
preprocess:
Expand Down Expand Up @@ -68,14 +68,14 @@ jobs:
retention-days: 1

- name: Get file name
id: filename
id: filename
run: |
productName=$(yq e -r '.package.productName' src-tauri/tauri.conf.json)
# version=$(yq e -r '.version' package.json)
# build_time=$(TZ=UTC-8 date +%y%m%d%H)
git_des=$(git describe --long --tags --always --dirty | sed 's/-g/-/')
echo "file_prefix=${productName}_${git_des}" >> "$GITHUB_OUTPUT"
# echo "build_time=${build_time}" >> "$GITHUB_OUTPUT"
productName=$(yq e -r '.package.productName' src-tauri/tauri.conf.json)
# version=$(yq e -r '.version' package.json)
# build_time=$(TZ=UTC-8 date +%y%m%d%H)
git_des=$(git describe --long --tags --always --dirty | sed 's/-g/-/')
echo "file_prefix=${productName}_${git_des}" >> "$GITHUB_OUTPUT"
# echo "build_time=${build_time}" >> "$GITHUB_OUTPUT"
- name: Setting variable
id: setting
Expand Down Expand Up @@ -117,12 +117,13 @@ jobs:

runs-on: ${{ matrix.os }}
env:
RETENTION_DAYS: ${{ needs.preprocess.outputs.retention_days }}
RETENTION_DAYS: ${{ needs.preprocess.outputs.retention_days }}
FILE_PREFIX: ${{ needs.preprocess.outputs.file_prefix }}
# BUILD_TIME: ${{ needs.preprocess.outputs.build_time }}
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
NO_STRIP: true
CI: false
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down Expand Up @@ -163,7 +164,7 @@ jobs:
- name: Rust cache
uses: swatinem/rust-cache@v2
with:
workspaces: './src-tauri -> target'
workspaces: "./src-tauri -> target"

- name: Install dependencies
run: pnpm install --frozen-lockfile
Expand Down Expand Up @@ -191,7 +192,7 @@ jobs:
mv src-tauri/target/release/bundle/deb/*.deb src-tauri/target/${{ env.FILE_PREFIX }}-amd64.deb
mv src-tauri/target/release/bundle/rpm/*.rpm src-tauri/target/${{ env.FILE_PREFIX }}-amd64.rpm
mv src-tauri/target/release/bundle/appimage/*.AppImage src-tauri/target/${{ env.FILE_PREFIX }}-amd64.AppImage
- name: Upload artifacts (Windows)
if: matrix.os == 'windows-latest'
uses: actions/upload-artifact@v4
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ jobs:
strategy:
fail-fast: false
matrix:
platform: [macos-latest, macos-12, windows-latest, ubuntu-20.04]
platform: [windows-latest, macos-latest, macos-12, ubuntu-20.04]

runs-on: ${{ matrix.platform }}

steps:
Expand Down Expand Up @@ -87,6 +88,7 @@ jobs:
uses: tauri-apps/tauri-action@v0

env:
CI: false
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
Expand Down
8 changes: 3 additions & 5 deletions README.ja-JP.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,11 @@

### Windows

手動インストール: [Universal](https://mirror.ghproxy.com/https://github.com/EcoPasteHub/EcoPaste/releases/download/v0.0.6/EcoPaste_0.0.6_x64_zh-CN.msi)

インストールなし: [Universal](https://mirror.ghproxy.com/https://github.com/EcoPasteHub/EcoPaste/releases/download/v0.0.6/EcoPaste_0.0.6_Windows_x64_Portable.zip)
手動インストール: [Universal](https://gh-proxy.com/https://github.com/EcoPasteHub/EcoPaste/releases/download/v0.0.6/EcoPaste_0.0.6_x64-setup.exe)

### Macos

手動インストール: [Apple Silicon](https://mirror.ghproxy.com/https://github.com/EcoPasteHub/EcoPaste/releases/download/v0.0.6/EcoPaste_0.0.6_aarch64.dmg) | [Intel](https://mirror.ghproxy.com/https://github.com/EcoPasteHub/EcoPaste/releases/download/v0.0.6/EcoPaste_0.0.6_x64.dmg)
手動インストール: [Apple Silicon](https://gh-proxy.com/https://github.com/EcoPasteHub/EcoPaste/releases/download/v0.0.6/EcoPaste_0.0.6_aarch64.dmg) | [Intel](https://gh-proxy.com/https://github.com/EcoPasteHub/EcoPaste/releases/download/v0.0.6/EcoPaste_0.0.6_x64.dmg)

HomeBrew:

Expand Down Expand Up @@ -95,7 +93,7 @@ brew untap EcoPasteHub/EcoPaste

### Linux

手動インストール: [AppImage](https://mirror.ghproxy.com/https://github.com/EcoPasteHub/EcoPaste/releases/download/v0.0.6/eco-paste_0.0.6_amd64.AppImage) | [deb](https://mirror.ghproxy.com/https://github.com/EcoPasteHub/EcoPaste/releases/download/v0.0.6/eco-paste_0.0.6_amd64.deb) | [rpm](https://mirror.ghproxy.com/https://github.com/EcoPasteHub/EcoPaste/releases/download/v0.0.6/eco-paste-0.0.6-1.x86_64.rpm)
手動インストール: [AppImage](https://gh-proxy.com/https://github.com/EcoPasteHub/EcoPaste/releases/download/v0.0.6/eco-paste_0.0.6_amd64.AppImage) | [deb](https://gh-proxy.com/https://github.com/EcoPasteHub/EcoPaste/releases/download/v0.0.6/eco-paste_0.0.6_amd64.deb) | [rpm](https://gh-proxy.com/https://github.com/EcoPasteHub/EcoPaste/releases/download/v0.0.6/eco-paste-0.0.6-1.x86_64.rpm)

## 機能の概要

Expand Down
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,11 @@

### Windows

Install Manually: [Universal](https://mirror.ghproxy.com/https://github.com/EcoPasteHub/EcoPaste/releases/download/v0.0.6/EcoPaste_0.0.6_x64_zh-CN.msi)

Portable: [Universal](https://mirror.ghproxy.com/https://github.com/EcoPasteHub/EcoPaste/releases/download/v0.0.6/EcoPaste_0.0.6_Windows_x64_Portable.zip)
Install Manually: [Universal](https://gh-proxy.com/https://github.com/EcoPasteHub/EcoPaste/releases/download/v0.0.6/EcoPaste_0.0.6_x64-setup.exe)

### Macos

Install Manually: [Apple Silicon](https://mirror.ghproxy.com/https://github.com/EcoPasteHub/EcoPaste/releases/download/v0.0.6/EcoPaste_0.0.6_aarch64.dmg) | [Intel](https://mirror.ghproxy.com/https://github.com/EcoPasteHub/EcoPaste/releases/download/v0.0.6/EcoPaste_0.0.6_x64.dmg)
Install Manually: [Apple Silicon](https://gh-proxy.com/https://github.com/EcoPasteHub/EcoPaste/releases/download/v0.0.6/EcoPaste_0.0.6_aarch64.dmg) | [Intel](https://gh-proxy.com/https://github.com/EcoPasteHub/EcoPaste/releases/download/v0.0.6/EcoPaste_0.0.6_x64.dmg)

HomeBrew:

Expand Down Expand Up @@ -95,7 +93,7 @@ brew untap EcoPasteHub/EcoPaste

### Linux

Install Manually: [AppImage](https://mirror.ghproxy.com/https://github.com/EcoPasteHub/EcoPaste/releases/download/v0.0.6/eco-paste_0.0.6_amd64.AppImage) | [deb](https://mirror.ghproxy.com/https://github.com/EcoPasteHub/EcoPaste/releases/download/v0.0.6/eco-paste_0.0.6_amd64.deb) | [rpm](https://mirror.ghproxy.com/https://github.com/EcoPasteHub/EcoPaste/releases/download/v0.0.6/eco-paste-0.0.6-1.x86_64.rpm)
Install Manually: [AppImage](https://gh-proxy.com/https://github.com/EcoPasteHub/EcoPaste/releases/download/v0.0.6/eco-paste_0.0.6_amd64.AppImage) | [deb](https://gh-proxy.com/https://github.com/EcoPasteHub/EcoPaste/releases/download/v0.0.6/eco-paste_0.0.6_amd64.deb) | [rpm](https://gh-proxy.com/https://github.com/EcoPasteHub/EcoPaste/releases/download/v0.0.6/eco-paste-0.0.6-1.x86_64.rpm)

## Features

Expand Down
8 changes: 3 additions & 5 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,11 @@

### Windows

手动安装:[Universal](https://mirror.ghproxy.com/https://github.com/EcoPasteHub/EcoPaste/releases/download/v0.0.6/EcoPaste_0.0.6_x64_zh-CN.msi)

免安装:[Universal](https://mirror.ghproxy.com/https://github.com/EcoPasteHub/EcoPaste/releases/download/v0.0.6/EcoPaste_0.0.6_Windows_x64_Portable.zip)
手动安装:[Universal](https://gh-proxy.com/https://github.com/EcoPasteHub/EcoPaste/releases/download/v0.0.6/EcoPaste_0.0.6_x64-setup.exe)

### Macos

手动安装:[Apple Silicon](https://mirror.ghproxy.com/https://github.com/EcoPasteHub/EcoPaste/releases/download/v0.0.6/EcoPaste_0.0.6_aarch64.dmg) | [Intel](https://mirror.ghproxy.com/https://github.com/EcoPasteHub/EcoPaste/releases/download/v0.0.6/EcoPaste_0.0.6_x64.dmg)
手动安装:[Apple Silicon](https://gh-proxy.com/https://github.com/EcoPasteHub/EcoPaste/releases/download/v0.0.6/EcoPaste_0.0.6_aarch64.dmg) | [Intel](https://gh-proxy.com/https://github.com/EcoPasteHub/EcoPaste/releases/download/v0.0.6/EcoPaste_0.0.6_x64.dmg)

HomeBrew:

Expand Down Expand Up @@ -95,7 +93,7 @@ brew untap EcoPasteHub/EcoPaste

### Linux

手动安装: [AppImage](https://mirror.ghproxy.com/https://github.com/EcoPasteHub/EcoPaste/releases/download/v0.0.6/eco-paste_0.0.6_amd64.AppImage) | [deb](https://mirror.ghproxy.com/https://github.com/EcoPasteHub/EcoPaste/releases/download/v0.0.6/eco-paste_0.0.6_amd64.deb) | [rpm](https://mirror.ghproxy.com/https://github.com/EcoPasteHub/EcoPaste/releases/download/v0.0.6/eco-paste-0.0.6-1.x86_64.rpm)
手动安装: [AppImage](https://gh-proxy.com/https://github.com/EcoPasteHub/EcoPaste/releases/download/v0.0.6/eco-paste_0.0.6_amd64.AppImage) | [deb](https://gh-proxy.com/https://github.com/EcoPasteHub/EcoPaste/releases/download/v0.0.6/eco-paste_0.0.6_amd64.deb) | [rpm](https://gh-proxy.com/https://github.com/EcoPasteHub/EcoPaste/releases/download/v0.0.6/eco-paste-0.0.6-1.x86_64.rpm)

## 功能介绍

Expand Down
8 changes: 3 additions & 5 deletions README.zh-TW.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,11 @@

### Windows

手動安裝:[Universal](https://mirror.ghproxy.com/https://github.com/EcoPasteHub/EcoPaste/releases/download/v0.0.6/EcoPaste_0.0.6_x64_zh-CN.msi)

免安裝: [Universal](https://mirror.ghproxy.com/https://github.com/EcoPasteHub/EcoPaste/releases/download/v0.0.6/EcoPaste_0.0.6_Windows_x64_Portable.zip)
手動安裝:[Universal](https://gh-proxy.com/https://github.com/EcoPasteHub/EcoPaste/releases/download/v0.0.6/EcoPaste_0.0.6_x64-setup.exe)

### Macos

手動安裝:[Apple Silicon](https://mirror.ghproxy.com/https://github.com/EcoPasteHub/EcoPaste/releases/download/v0.0.6/EcoPaste_0.0.6_aarch64.dmg) | [Intel](https://mirror.ghproxy.com/https://github.com/EcoPasteHub/EcoPaste/releases/download/v0.0.6/EcoPaste_0.0.6_x64.dmg)
手動安裝:[Apple Silicon](https://gh-proxy.com/https://github.com/EcoPasteHub/EcoPaste/releases/download/v0.0.6/EcoPaste_0.0.6_aarch64.dmg) | [Intel](https://gh-proxy.com/https://github.com/EcoPasteHub/EcoPaste/releases/download/v0.0.6/EcoPaste_0.0.6_x64.dmg)

HomeBrew:

Expand Down Expand Up @@ -95,7 +93,7 @@ brew untap EcoPasteHub/EcoPaste

### Linux

手動安裝:[AppImage](https://mirror.ghproxy.com/https://github.com/EcoPasteHub/EcoPaste/releases/download/v0.0.6/eco-paste_0.0.6_amd64.AppImage) | [deb](https://mirror.ghproxy.com/https://github.com/EcoPasteHub/EcoPaste/releases/download/v0.0.6/eco-paste_0.0.6_amd64.deb) | [rpm](https://mirror.ghproxy.com/https://github.com/EcoPasteHub/EcoPaste/releases/download/v0.0.6/eco-paste-0.0.6-1.x86_64.rpm)
手動安裝:[AppImage](https://gh-proxy.com/https://github.com/EcoPasteHub/EcoPaste/releases/download/v0.0.6/eco-paste_0.0.6_amd64.AppImage) | [deb](https://gh-proxy.com/https://github.com/EcoPasteHub/EcoPaste/releases/download/v0.0.6/eco-paste_0.0.6_amd64.deb) | [rpm](https://gh-proxy.com/https://github.com/EcoPasteHub/EcoPaste/releases/download/v0.0.6/eco-paste-0.0.6-1.x86_64.rpm)

## 功能介紹

Expand Down
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,17 @@
"lint": "biome check --write src",
"preinstall": "npx only-allow pnpm",
"prepare": "simple-git-hooks",
"release": "release-it"
"release": "release-it",
"release-rc": "release-it --preRelease=rc --preReleaseBase=1",
"release-beta": "release-it --preRelease=beta --preReleaseBase=1"
},
"dependencies": {
"@ant-design/happy-work-theme": "^1.0.0",
"@tanstack/react-virtual": "^3.8.3",
"@tauri-apps/api": "^1.6.0",
"@unocss/reset": "^0.60.3",
"ahooks": "^3.8.0",
"antd": "^5.19.1",
"antd": "^5.20.5",
"arcdash": "^0.0.51",
"clsx": "^2.1.1",
"dayjs": "^1.11.11",
Expand Down Expand Up @@ -65,7 +67,7 @@
"@vitejs/plugin-react": "^4.2.1",
"lint-staged": "^15.2.5",
"npm-run-all": "^4.1.5",
"release-it": "^17.4.1",
"release-it": "^17.6.0",
"sass": "^1.77.4",
"simple-git-hooks": "^2.11.1",
"tsx": "^4.16.2",
Expand Down
Loading

0 comments on commit 7b4a4db

Please sign in to comment.