Skip to content

Commit 997ba3c

Browse files
committed
Fix asset uploading in release workflow
1 parent a6367c7 commit 997ba3c

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,10 @@ jobs:
5555
const distFile = "dist.zip";
5656
5757
let errorMessage;
58-
for (const { name: tag, version } of publishedPackages) {
58+
for (const { name, version } of publishedPackages) {
59+
const tag = `${name}@${version}`;
5960
// Only upload the dist archive for the chore package, plugins, and extensions
60-
if (tag.startsWith("jspsych@") || tag.includes("/plugin-") || tag.includes("/extension-")) {
61+
if (name.startsWith("jspsych@") || name.includes("/plugin-") || name.includes("/extension-")) {
6162
console.log(`Uploading dist archive release asset for ${tag}`);
6263
try {
6364
// https://docs.github.com/en/rest/reference/repos#get-a-release-by-tag-name
@@ -74,12 +75,7 @@ jobs:
7475
owner,
7576
repo,
7677
release_id: releaseId,
77-
78-
// Tag to filename transformation:
79-
// * [email protected] => jspsych-1.2.3-dist.zip
80-
// * @jspsych/[email protected] => jspsych-plugin-test-1.2.3-dist.zip
81-
name: `${tag.replace("@jspsych/", "jspsych-").replace("@", "-")}-dist.zip`,
82-
78+
name: `${name.replace("@jspsych/", "jspsych-")}-${version}-dist.zip`,
8379
label: "Dist archive (zip)",
8480
headers: {
8581
"content-type": "application/zip",

0 commit comments

Comments
 (0)