mirror of
https://github.com/markusmo3/obsidian-private-mode.git
synced 2026-07-22 05:42:42 +00:00
Add ability to make release locally
This commit is contained in:
parent
f1530b598b
commit
f7a8b38608
4 changed files with 18 additions and 7 deletions
12
.github/make_release.sh
vendored
Normal file
12
.github/make_release.sh
vendored
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
PLUGIN_NAME=${1:-${PWD##*/}}
|
||||
|
||||
rm -r ${PLUGIN_NAME}
|
||||
mkdir ${PLUGIN_NAME}
|
||||
for f in main.js manifest.json styles.scss styles.css; do
|
||||
if [[ -f $f ]]; then
|
||||
cp $f "${PLUGIN_NAME}/"
|
||||
fi
|
||||
done
|
||||
zip -r "${PLUGIN_NAME}".zip "$PLUGIN_NAME"
|
||||
8
.github/workflows/release.yml
vendored
8
.github/workflows/release.yml
vendored
|
|
@ -27,13 +27,7 @@ jobs:
|
|||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
PLUGIN_NAME: ${{ github.event.repository.name }}
|
||||
run: |
|
||||
mkdir ${PLUGIN_NAME}
|
||||
for f in main.js manifest.json styles.scss styles.css; do
|
||||
if [[ -f $f ]]; then
|
||||
cp $f "${PLUGIN_NAME}/"
|
||||
fi
|
||||
done
|
||||
zip -r "${PLUGIN_NAME}".zip "$PLUGIN_NAME"
|
||||
sh ./.github/make_release.sh ${PLUGIN_NAME}
|
||||
|
||||
tag="${GITHUB_REF#refs/tags/}"
|
||||
gh release create "$tag" --generate-notes ${PLUGIN_NAME}.zip
|
||||
|
|
|
|||
4
.gitignore
vendored
4
.gitignore
vendored
|
|
@ -22,3 +22,7 @@ data.json
|
|||
|
||||
# Exclude macOS Finder (System Explorer) View States
|
||||
.DS_Store
|
||||
|
||||
# Exclude release
|
||||
obsidian-private-mode/
|
||||
obsidian-private-mode.zip
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
"scripts": {
|
||||
"dev": "node esbuild.config.mjs",
|
||||
"build": "tsc -noEmit -skipLibCheck && node esbuild.config.mjs production && sass styles.scss styles.css",
|
||||
"make-release": "npm run build && bash ./.github/make_release.sh obsidian-private-mode",
|
||||
"version": "node version-bump.mjs && git add manifest.json versions.json",
|
||||
"lint": "eslint --cache --fix"
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue