From a0fc02d590199f6a9490d8e14d1d39c66b847f0e Mon Sep 17 00:00:00 2001 From: Felix Mosheev <9304194+felixmosh@users.noreply.github.com> Date: Sun, 4 Feb 2024 10:14:20 +0200 Subject: [PATCH] Release 3.0.2 --- CHANGELOG.md | 11 ++++++++++- dist/post/index.js | 14 ++++++++++++-- package.json | 2 +- 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bd502a4..431b3f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,14 +4,23 @@ All notable changes to this project will be documented in this file. Dates are d Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). +#### [v3.0.2](https://github.com/felixmosh/turborepo-gh-artifacts/compare/v3.0.1...v3.0.2) + +- feat: ignore 409 conflict errors [`#24`](https://github.com/felixmosh/turborepo-gh-artifacts/pull/24) +- feat: add update:major-tag script [`8aaae7b`](https://github.com/felixmosh/turborepo-gh-artifacts/commit/8aaae7b30909fc14def15e73de2035fd01213a19) +- feat: extract major tag automatically [`0dcab50`](https://github.com/felixmosh/turborepo-gh-artifacts/commit/0dcab50a0b03f6d14627ac11334d6371ad23716b) + #### [v3.0.1](https://github.com/felixmosh/turborepo-gh-artifacts/compare/v3...v3.0.1) -- fix: bump to node20, since 18 doesn't exists [`009c36c`](https://github.com/felixmosh/turborepo-gh-artifacts/commit/009c36c1bc2038c63931fa51fe983d8949d026d4) +> 29 January 2024 #### [v3](https://github.com/felixmosh/turborepo-gh-artifacts/compare/v3.0.0...v3) > 29 January 2024 +- fix: bump to node20, since 18 doesn't exists [`009c36c`](https://github.com/felixmosh/turborepo-gh-artifacts/commit/009c36c1bc2038c63931fa51fe983d8949d026d4) +- Release 3.0.1 [`44bc1d2`](https://github.com/felixmosh/turborepo-gh-artifacts/commit/44bc1d21eb11c98fd8e29f61a5ec8c7dac1a2775) + ### [v3.0.0](https://github.com/felixmosh/turborepo-gh-artifacts/compare/v2.1.1...v3.0.0) > 29 January 2024 diff --git a/dist/post/index.js b/dist/post/index.js index 93d4917..46b5f62 100644 --- a/dist/post/index.js +++ b/dist/post/index.js @@ -138388,8 +138388,18 @@ async function uploadArtifacts() { } await Promise.all(artifactsToUpload.map(async ({ artifactFilename, artifactId }) => { (0,core.info)(`Uploading ${artifactFilename}`); - await client.uploadArtifact(artifactId, [external_path_default().join(cacheDir, artifactFilename)], cacheDir); - (0,core.info)(`Uploaded ${artifactFilename} successfully`); + try { + await client.uploadArtifact(artifactId, [external_path_default().join(cacheDir, artifactFilename)], cacheDir); + (0,core.info)(`Uploaded ${artifactFilename} successfully`); + } + catch (err) { + if (err instanceof Error && err.message.includes('(409) Conflict:')) { + // an artifact with the same hash must have been already uploaded by another job running in parallel + (0,core.info)(`Artifact ${artifactFilename} already exists, skipping...`); + return; + } + throw err; + } })); } diff --git a/package.json b/package.json index 013d0a2..fae69b0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "turborepo-gh-artifacts", - "version": "3.0.1", + "version": "3.0.2", "description": "A TurboRepo local cache server which uploads artifact cache to GH artifacts.", "license": "MIT", "author": "felixmosh",