diff --git a/dist/index.js b/dist/index.js index d99b8566..674c367d 100644 --- a/dist/index.js +++ b/dist/index.js @@ -263,15 +263,17 @@ class ReleaseDownloader { } } if (downloadSettings.tarBall) { + const repoName = downloadSettings.sourceRepoPath.split("/")[1]; downloads.push({ - fileName: `${ghRelease.tag_name}.tar.gz`, + fileName: `${repoName}-${ghRelease.tag_name}.tar.gz`, url: ghRelease.tarball_url, isTarBallOrZipBall: true }); } if (downloadSettings.zipBall) { + const repoName = downloadSettings.sourceRepoPath.split("/")[1]; downloads.push({ - fileName: `${ghRelease.tag_name}.zip`, + fileName: `${repoName}-${ghRelease.tag_name}.zip`, url: ghRelease.zipball_url, isTarBallOrZipBall: true }); diff --git a/package-lock.json b/package-lock.json index 5f5b5b0b..b716ed11 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8644,8 +8644,7 @@ "version": "5.3.2", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true, - "requires": {} + "dev": true }, "acorn-walk": { "version": "7.2.0", @@ -9366,8 +9365,7 @@ "version": "8.3.0", "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.3.0.tgz", "integrity": "sha512-BgZuLUSeKzvlL/VUjx/Yb787VQ26RU3gGjA3iiFvdsp/2bMfVIWUVP7tjxtjS0e+HP409cPlPvNkQloz8C91ew==", - "dev": true, - "requires": {} + "dev": true }, "eslint-import-resolver-node": { "version": "0.3.6", @@ -9476,8 +9474,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/eslint-plugin-i18n-text/-/eslint-plugin-i18n-text-1.0.1.tgz", "integrity": "sha512-3G3UetST6rdqhqW9SfcfzNYMpQXS7wNkJvp6dsXnjzGiku6Iu5hl3B0kmk6lIcFPwYjhQIY+tXVRtK9TlGT7RA==", - "dev": true, - "requires": {} + "dev": true }, "eslint-plugin-import": { "version": "2.25.3", @@ -11110,8 +11107,7 @@ "version": "1.2.2", "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz", "integrity": "sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w==", - "dev": true, - "requires": {} + "dev": true }, "jest-regex-util": { "version": "27.5.1", @@ -12555,8 +12551,7 @@ "version": "7.5.7", "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.7.tgz", "integrity": "sha512-KMvVuFzpKBuiIXW3E4u3mySRO2/mCHSyZDJQM5NQ9Q9KHWHWh0NHgfbRMLLrceUK5qAL4ytALJbpRMjixFZh8A==", - "dev": true, - "requires": {} + "dev": true }, "xml-name-validator": { "version": "3.0.0", diff --git a/src/release-downloader.ts b/src/release-downloader.ts index d15ea071..c164eb1f 100644 --- a/src/release-downloader.ts +++ b/src/release-downloader.ts @@ -140,16 +140,18 @@ export class ReleaseDownloader { } if (downloadSettings.tarBall) { + const repoName = downloadSettings.sourceRepoPath.split("/")[1] downloads.push({ - fileName: `${ghRelease.tag_name}.tar.gz`, + fileName: `${repoName}-${ghRelease.tag_name}.tar.gz`, url: ghRelease.tarball_url, isTarBallOrZipBall: true }) } if (downloadSettings.zipBall) { + const repoName = downloadSettings.sourceRepoPath.split("/")[1] downloads.push({ - fileName: `${ghRelease.tag_name}.zip`, + fileName: `${repoName}-${ghRelease.tag_name}.zip`, url: ghRelease.zipball_url, isTarBallOrZipBall: true })