mirror of
https://github.com/AkiChase/scrcpy-mask
synced 2025-04-21 04:25:13 +08:00
Scrcpy Mask v0.0.6
This commit is contained in:
parent
5af1a9184f
commit
0a6e500e36
6
.github/workflows/publish.yml
vendored
6
.github/workflows/publish.yml
vendored
@ -5,6 +5,8 @@ on:
|
|||||||
# 匹配特定标签 (refs/tags)
|
# 匹配特定标签 (refs/tags)
|
||||||
tags:
|
tags:
|
||||||
- 'v*' # 推送事件匹配 v*, 例如 v1.0,v20.15.10 等来触发工作流
|
- 'v*' # 推送事件匹配 v*, 例如 v1.0,v20.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.
|
# 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:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
tagName: app-v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version.
|
releaseName: 'Scrcpy Mask ${{ github.ref_name }}'
|
||||||
releaseName: 'App v__VERSION__'
|
|
||||||
releaseBody: 'See the assets to download this version and install.'
|
|
||||||
releaseDraft: true
|
releaseDraft: true
|
||||||
prerelease: false
|
prerelease: false
|
||||||
args: ${{ matrix.args }}
|
args: ${{ matrix.args }}
|
||||||
|
@ -1,13 +1,14 @@
|
|||||||
{
|
{
|
||||||
"name": "scrcpy-mask",
|
"name": "scrcpy-mask",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "0.0.0",
|
"version": "0.0.6",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
"build": "vue-tsc --noEmit && vite build",
|
"build": "vue-tsc --noEmit && vite build",
|
||||||
"preview": "vite preview",
|
"preview": "vite preview",
|
||||||
"tauri": "tauri"
|
"tauri": "tauri",
|
||||||
|
"publish": "node publish.js"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@tauri-apps/api": ">=2.0.0-beta.8",
|
"@tauri-apps/api": ">=2.0.0-beta.8",
|
||||||
|
36
publish.js
Normal file
36
publish.js
Normal 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");
|
||||||
|
});
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "scrcpy-mask"
|
name = "scrcpy-mask"
|
||||||
version = "0.0.0"
|
version = "0.0.6"
|
||||||
description = "A Tauri App"
|
description = "A Tauri App"
|
||||||
authors = ["AkiChase"]
|
authors = ["AkiChase"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
Loading…
Reference in New Issue
Block a user