mirror of
https://github.com/AkiChase/scrcpy-mask
synced 2025-02-23 07:22:17 +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)
|
||||
tags:
|
||||
- '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.
|
||||
|
||||
@ -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 }}
|
||||
|
@ -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
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]
|
||||
name = "scrcpy-mask"
|
||||
version = "0.0.0"
|
||||
version = "0.0.6"
|
||||
description = "A Tauri App"
|
||||
authors = ["AkiChase"]
|
||||
edition = "2021"
|
||||
|
Loading…
Reference in New Issue
Block a user