Scrcpy Mask v0.0.6

This commit is contained in:
AkiChase 2024-05-01 12:48:32 +08:00
parent 5af1a9184f
commit 0a6e500e36
4 changed files with 43 additions and 6 deletions

View File

@ -5,6 +5,8 @@ on:
# 匹配特定标签 (refs/tags)
tags:
- 'v*' # 推送事件匹配 v*, 例如 v1.0v20.15.10 等来触发工作流
branches:
- master
# This workflow will trigger on each push to the `release` branch to create or update a GitHub release, build your app, and upload the artifacts to the release.
@ -60,9 +62,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tagName: app-v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version.
releaseName: 'App v__VERSION__'
releaseBody: 'See the assets to download this version and install.'
releaseName: 'Scrcpy Mask ${{ github.ref_name }}'
releaseDraft: true
prerelease: false
args: ${{ matrix.args }}

View File

@ -1,13 +1,14 @@
{
"name": "scrcpy-mask",
"private": true,
"version": "0.0.0",
"version": "0.0.6",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vue-tsc --noEmit && vite build",
"preview": "vite preview",
"tauri": "tauri"
"tauri": "tauri",
"publish": "node publish.js"
},
"dependencies": {
"@tauri-apps/api": ">=2.0.0-beta.8",

36
publish.js Normal file
View File

@ -0,0 +1,36 @@
import { execSync } from "child_process";
import { readFileSync, writeFileSync } from "fs";
// receive version arg
process.stdin.setEncoding("utf8");
console.log("Input new version:");
process.stdin.on("data", function (data) {
var version = data.trim();
if (!version) {
console.log("version is required");
console.log("Input new version:");
return;
}
process.stdin.pause();
console.log("publishing version: " + version);
console.log("update package.json version");
console.log(
execSync("pnpm version --no-git-tag-version " + version).toString()
);
console.log("update cargo.toml version\n");
const lines = readFileSync("./src-tauri/Cargo.toml", "utf8").split("\n");
for (let i = 0; i < lines.length; i++) {
if (lines[i].startsWith("version")) {
lines[i] = `version = "${version}"`;
break;
}
}
writeFileSync("./src-tauri/Cargo.toml", lines.join("\n"));
console.log("git commit and tag");
console.log(execSync(`git add . && git commit -m "Scrcpy Mask v${version}" && git tag v${version}`).toString());
console.log("Pleash push to github or cancel manually");
});

View File

@ -1,6 +1,6 @@
[package]
name = "scrcpy-mask"
version = "0.0.0"
version = "0.0.6"
description = "A Tauri App"
authors = ["AkiChase"]
edition = "2021"