Skip to content

Commit

Permalink
fix(build): properly build assets for releases
Browse files Browse the repository at this point in the history
  • Loading branch information
xeroc committed Dec 1, 2023
1 parent 57e77f4 commit 88d2629
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 28 deletions.
46 changes: 24 additions & 22 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
# vscode
.vscode

# Intellij
*.iml
.idea

# npm
node_modules

# Don't include the compiled main.js file in the repo.
# They should be uploaded to GitHub releases instead.
main.js

# Exclude sourcemaps
*.map

# obsidian
data.json

# Exclude macOS Finder (System Explorer) View States
.DS_Store
# vscode
.vscode

# Intellij
*.iml
.idea

# npm
node_modules

# Don't include the compiled main.js file in the repo.
# They should be uploaded to GitHub releases instead.
main.js

# Exclude sourcemaps
*.map

# obsidian
data.json

# Exclude macOS Finder (System Explorer) View States
.DS_Store

dist/release.zip
Empty file added dist/.empty
Empty file.
9 changes: 3 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,9 @@
"addReleases": true,
"assets": [
{
"path": [
"main.js",
"manifest.json",
"styles.css"
],
"label": "Plugin Release"
"path": "dist/release.zip",
"name": "obsidian-plugin-${nextRelease.gitTag}.zip",
"label": "Obsidian Plugin Bundle (${nextRelease.gitTag})"
}
]
}
Expand Down
3 changes: 3 additions & 0 deletions release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ fi
TEMPFILE=$(mktemp)
cp versions.json $TEMPFILE
jq '."'$1'" = "'$REQUIRED_OBSIDIAN_VERSION'"' $TEMPFILE >versions.json

# Now lets zip the files
zip dist/release.zip main.js manifest.json styles.css

0 comments on commit 88d2629

Please sign in to comment.