diff --git a/CHANGELOG.md b/CHANGELOG.md index f13c536e..4eb210cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 2.4.1 (2020/12/02) + +* Do not overwrite GORELEASER_CURRENT_TAG if already declared (#260) + ## 2.4.0 (2020/11/30) * Set GORELEASER_CURRENT_TAG (#259) diff --git a/dist/index.js b/dist/index.js index 5d952732..45c8d3c8 100644 --- a/dist/index.js +++ b/dist/index.js @@ -378,7 +378,9 @@ function run() { } } core.info('🏃 Running GoReleaser...'); - process.env.GORELEASER_CURRENT_TAG = tag; + if (!('GORELEASER_CURRENT_TAG' in process.env)) { + process.env.GORELEASER_CURRENT_TAG = tag; + } yield exec.exec(`${goreleaser} ${args}${snapshot}`); } catch (error) { diff --git a/src/main.ts b/src/main.ts index 9b073909..ed47cd9e 100644 --- a/src/main.ts +++ b/src/main.ts @@ -44,7 +44,9 @@ async function run(): Promise { } core.info('🏃 Running GoReleaser...'); - process.env.GORELEASER_CURRENT_TAG = tag; + if (!('GORELEASER_CURRENT_TAG' in process.env)) { + process.env.GORELEASER_CURRENT_TAG = tag; + } await exec.exec(`${goreleaser} ${args}${snapshot}`); } catch (error) { core.setFailed(error.message);