From 24ed1a352802348c9e4e8d13de9177fb95b537ba Mon Sep 17 00:00:00 2001 From: Cory Miller <13227161+cory-miller@users.noreply.github.com> Date: Thu, 16 May 2024 13:40:36 -0400 Subject: [PATCH 1/2] Check platform for extension (#1732) --- dist/index.js | 4 +++- src/github-api-helper.ts | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index c39596b5b..e128adfe4 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1574,7 +1574,9 @@ function downloadRepository(authToken, owner, repo, ref, commit, repositoryPath, // Write archive to disk core.info('Writing archive to disk'); const uniqueId = (0, uuid_1.v4)(); - const archivePath = path.join(repositoryPath, `${uniqueId}.tar.gz`); + const archivePath = IS_WINDOWS + ? path.join(repositoryPath, `${uniqueId}.zip`) + : path.join(repositoryPath, `${uniqueId}.tar.gz`); yield fs.promises.writeFile(archivePath, archiveData); archiveData = Buffer.from(''); // Free memory // Extract archive diff --git a/src/github-api-helper.ts b/src/github-api-helper.ts index 8eb65d1f3..1ff27c2c7 100644 --- a/src/github-api-helper.ts +++ b/src/github-api-helper.ts @@ -35,7 +35,9 @@ export async function downloadRepository( // Write archive to disk core.info('Writing archive to disk') const uniqueId = uuid() - const archivePath = path.join(repositoryPath, `${uniqueId}.tar.gz`) + const archivePath = IS_WINDOWS + ? path.join(repositoryPath, `${uniqueId}.zip`) + : path.join(repositoryPath, `${uniqueId}.tar.gz`) await fs.promises.writeFile(archivePath, archiveData) archiveData = Buffer.from('') // Free memory From a5ac7e51b41094c92402da3b24376905380afc29 Mon Sep 17 00:00:00 2001 From: Cory Miller <13227161+cory-miller@users.noreply.github.com> Date: Thu, 16 May 2024 14:08:36 -0400 Subject: [PATCH 2/2] Update for 4.1.6 release (#1733) --- CHANGELOG.md | 10 ++++++++++ package-lock.json | 2 +- package.json | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a1a3a24aa..341b3910f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +## v4.1.6 +* Check platform to set archive extension appropriately by @cory-miller in https://github.com/actions/checkout/pull/1732 + +## v4.1.5 +* Update NPM dependencies by @cory-miller in https://github.com/actions/checkout/pull/1703 +* Bump github/codeql-action from 2 to 3 by @dependabot in https://github.com/actions/checkout/pull/1694 +* Bump actions/setup-node from 1 to 4 by @dependabot in https://github.com/actions/checkout/pull/1696 +* Bump actions/upload-artifact from 2 to 4 by @dependabot in https://github.com/actions/checkout/pull/1695 +* README: Suggest `user.email` to be `41898282+github-actions[bot]@users.noreply.github.com` by @cory-miller in https://github.com/actions/checkout/pull/1707 + ## v4.1.4 - Disable `extensions.worktreeConfig` when disabling `sparse-checkout` by @jww3 in https://github.com/actions/checkout/pull/1692 - Add dependabot config by @cory-miller in https://github.com/actions/checkout/pull/1688 diff --git a/package-lock.json b/package-lock.json index 47a0b5e1e..69ddc06ae 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "checkout", - "version": "4.1.4", + "version": "4.1.6", "lockfileVersion": 3, "requires": true, "packages": { diff --git a/package.json b/package.json index 323c4c230..e043c7848 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "checkout", - "version": "4.1.4", + "version": "4.1.6", "description": "checkout action", "main": "lib/main.js", "scripts": {