Squashed commit of the following:
commit 8928e6438277995f7167e400d4d77657a0ab0113 Author: Tunglies <77394545+Tunglies@users.noreply.github.com> Date: Fri Jul 25 18:25:13 2025 +0800 feat: add release step to development workflow for versioning commit 14085c4f7c8943669fdacae3bd2b6a07c0c0389a Author: Tunglies <77394545+Tunglies@users.noreply.github.com> Date: Fri Jul 25 18:19:36 2025 +0800 feat: add release commands for autobuild and deploytest to package.json and update version script
This commit is contained in:
5
.github/workflows/dev.yml
vendored
5
.github/workflows/dev.yml
vendored
@@ -21,6 +21,8 @@ on:
|
||||
|
||||
permissions: write-all
|
||||
env:
|
||||
TAG_NAME: deploytest
|
||||
TAG_CHANNEL: DeployTest
|
||||
CARGO_INCREMENTAL: 0
|
||||
RUST_BACKTRACE: short
|
||||
concurrency:
|
||||
@@ -88,6 +90,9 @@ jobs:
|
||||
pnpm i
|
||||
pnpm run prebuild ${{ matrix.target }}
|
||||
|
||||
- name: Release ${{ env.TAG_CHANNEL }} Version
|
||||
run: pnpm release-version ${{ env.TAG_NAME }}
|
||||
|
||||
- name: Tauri build
|
||||
if: github.event.inputs[matrix.input] == 'true'
|
||||
uses: tauri-apps/tauri-action@v0
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
"portable-fixed-webview2": "node scripts/portable-fixed-webview2.mjs",
|
||||
"fix-alpha-version": "node scripts/fix-alpha_version.mjs",
|
||||
"release-version": "node scripts/release-version.mjs",
|
||||
"release:autobuild": "pnpm release-version autobuild",
|
||||
"release:deploytest": "pnpm release-version deploytest",
|
||||
"publish-version": "node scripts/publish-version.mjs",
|
||||
"fmt": "cargo fmt --manifest-path ./src-tauri/Cargo.toml",
|
||||
"clippy": "cargo clippy --manifest-path ./src-tauri/Cargo.toml",
|
||||
|
||||
@@ -6,15 +6,17 @@
|
||||
*
|
||||
* <version> can be:
|
||||
* - A full semver version (e.g., 1.2.3, v1.2.3, 1.2.3-beta, v1.2.3+build)
|
||||
* - A tag: "alpha", "beta", "rc", or "autobuild"
|
||||
* - A tag: "alpha", "beta", "rc", "autobuild", or "deploytest"
|
||||
* - "alpha", "beta", "rc": Appends the tag to the current base version (e.g., 1.2.3-beta)
|
||||
* - "autobuild": Appends a timestamped autobuild tag (e.g., 1.2.3+autobuild.2406101530)
|
||||
* - "deploytest": Appends a timestamped deploytest tag (e.g., 1.2.3+deploytest.2406101530)
|
||||
*
|
||||
* Examples:
|
||||
* pnpm release-version 1.2.3
|
||||
* pnpm release-version v1.2.3-beta
|
||||
* pnpm release-version beta
|
||||
* pnpm release-version autobuild
|
||||
* pnpm release-version deploytest
|
||||
*
|
||||
* The script will:
|
||||
* - Validate and normalize the version argument
|
||||
@@ -214,7 +216,7 @@ async function main(versionArg) {
|
||||
|
||||
try {
|
||||
let newVersion;
|
||||
const validTags = ["alpha", "beta", "rc", "autobuild"];
|
||||
const validTags = ["alpha", "beta", "rc", "autobuild", "deploytest"];
|
||||
|
||||
if (validTags.includes(versionArg.toLowerCase())) {
|
||||
const currentVersion = await getCurrentVersion();
|
||||
@@ -223,6 +225,9 @@ async function main(versionArg) {
|
||||
if (versionArg.toLowerCase() === "autobuild") {
|
||||
// 格式: 2.3.0+autobuild.250613.cc39b27
|
||||
newVersion = `${baseVersion}+autobuild.${generateShortTimestamp(true)}`;
|
||||
} else if (versionArg.toLowerCase() === "deploytest") {
|
||||
// 格式: 2.3.0+deploytest.250613.cc39b27
|
||||
newVersion = `${baseVersion}+deploytest.${generateShortTimestamp(true)}`;
|
||||
} else {
|
||||
newVersion = `${baseVersion}-${versionArg.toLowerCase()}`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user