Fix plugin release
This commit is contained in:
parent
ec87a65e82
commit
fddb14886e
2 changed files with 10 additions and 7 deletions
2
.github/workflows/release-plugin.yml
vendored
2
.github/workflows/release-plugin.yml
vendored
|
|
@ -44,7 +44,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
tag="${GITHUB_REF#refs/tags/}"
|
tag="${GITHUB_REF#refs/tags/}"
|
||||||
|
|
||||||
cd plugin
|
cd plugin/build
|
||||||
|
|
||||||
gh release create "$tag" \
|
gh release create "$tag" \
|
||||||
--title="$tag" \
|
--title="$tag" \
|
||||||
|
|
|
||||||
|
|
@ -106,28 +106,31 @@ const context = await esbuild.context({
|
||||||
{
|
{
|
||||||
name: "post-compile",
|
name: "post-compile",
|
||||||
setup(build) {
|
setup(build) {
|
||||||
build.onEnd((result) => {
|
build.onEnd(async (result) => {
|
||||||
if (prod) {
|
if (prod) {
|
||||||
return;
|
await fs.promises.copyFile(
|
||||||
|
"manifest.json",
|
||||||
|
"build/manifest.json"
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (result.errors.length === 0) {
|
if (result.errors.length === 0) {
|
||||||
copyFiles(
|
await copyFiles(
|
||||||
["manifest.json", "versions.json", ".hotreload"],
|
["manifest.json", "versions.json", ".hotreload"],
|
||||||
"/mnt/c/Users/Andras/Desktop/test/test/.obsidian/plugins/my-plugin"
|
"/mnt/c/Users/Andras/Desktop/test/test/.obsidian/plugins/my-plugin"
|
||||||
);
|
);
|
||||||
|
|
||||||
copyFiles(
|
await copyFiles(
|
||||||
"build",
|
"build",
|
||||||
"/mnt/c/Users/Andras/Desktop/test/test/.obsidian/plugins/my-plugin"
|
"/mnt/c/Users/Andras/Desktop/test/test/.obsidian/plugins/my-plugin"
|
||||||
);
|
);
|
||||||
|
|
||||||
copyFiles(
|
await copyFiles(
|
||||||
["manifest.json", "versions.json", ".hotreload"],
|
["manifest.json", "versions.json", ".hotreload"],
|
||||||
"/mnt/c/Users/Andras/Desktop/test/test2/.obsidian/plugins/my-plugin"
|
"/mnt/c/Users/Andras/Desktop/test/test2/.obsidian/plugins/my-plugin"
|
||||||
);
|
);
|
||||||
|
|
||||||
copyFiles(
|
await copyFiles(
|
||||||
"build",
|
"build",
|
||||||
"/mnt/c/Users/Andras/Desktop/test/test2/.obsidian/plugins/my-plugin"
|
"/mnt/c/Users/Andras/Desktop/test/test2/.obsidian/plugins/my-plugin"
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue