Skip to content

Commit

Permalink
fix(workflow): publish dist for in memory and dockerized node
Browse files Browse the repository at this point in the history
  • Loading branch information
JackHamer09 committed Sep 29, 2023
1 parent 96dece8 commit 108e429
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ node_modules
.cache
.output
dist
dist-node-memory
dist-node-docker
.DS_Store
tests/e2e/src/support/extension
tests/e2e/reports
Expand Down
12 changes: 10 additions & 2 deletions .releaserc
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
[
"@semantic-release/exec",
{
"prepareCmd": "VITE_VERSION=${nextRelease.version} npm run generate",
"publishCmd": "zip -r dist.zip dist",
"prepareCmd": "VITE_VERSION=${nextRelease.version} sh scripts/create-release-assets.sh",
"publishCmd": "zip -r dist.zip dist && zip -r dist-node-memory.zip dist-node-memory && zip -r dist-node-docker.zip dist-node-docker",
"successCmd": "echo '::set-output name=releaseVersion::${nextRelease.version}'"
}
],
Expand All @@ -38,6 +38,14 @@
{
"path": "dist.zip",
"label": "Dist package"
},
{
"path": "dist-node-memory.zip",
"label": "In-memory node dist package"
},
{
"path": "dist-node-docker.zip",
"label": "Dockerized node dist package"
}
]
}
Expand Down
1 change: 0 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions scripts/create-release-assets.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/sh

# Ensure the script stops if any command fails
set -e

# Run the first npm command and move folder
npm run generate:node:memory
mv .output/public ./dist-node-memory

# Run the second npm command and move folder
npm run generate:node:docker
mv .output/public ./dist-node-docker

# Run the final npm command
npm run generate

0 comments on commit 108e429

Please sign in to comment.