Djaytan / mc-jobs-reborn-patch-place-break

A place-break patch extension of JobsReborn plugin for Bukkit servers (Minecraft).
MIT License
5 stars 2 forks source link

ci(release): apply workaround for resolving the envvar being interpreted as a Lodash template #579

Closed Djaytan closed 7 months ago

Djaytan commented 7 months ago

Here is the observed error when dispatching the release workflow:

ReferenceError: TMP_TAG_VERSION_NAME_FILE is not defined
    at eval (lodash.templateSources[1]:9:10)
    at module.exports (/home/runner/work/mc-jobs-reborn-patch-place-break/mc-jobs-reborn-patch-place-break/.github/node_modules/@semantic-release/exec/lib/exec.js:7:39)
    at publish (/home/runner/work/mc-jobs-reborn-patch-place-break/mc-jobs-reborn-patch-place-break/.github/node_modules/@semantic-release/exec/index.js:62:26)
    at validator (file:///home/runner/work/mc-jobs-reborn-patch-place-break/mc-jobs-reborn-patch-place-break/.github/node_modules/semantic-release/lib/plugins/normalize.js:36:30)
    at file:///home/runner/work/mc-jobs-reborn-patch-place-break/mc-jobs-reborn-patch-place-break/.github/node_modules/semantic-release/lib/plugins/pipeline.js:38:42
    at next (file:///home/runner/work/mc-jobs-reborn-patch-place-break/mc-jobs-reborn-patch-place-break/.github/node_modules/p-reduce/index.js:16:10)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {

But in fact the issue is due to an attempt to resolve a Lodash template from the string ${TMP_TAG_VERSION_NAME_FILE}. The hint is provided by the printed error stack trace: at eval (lodash.templateSources[1]:9:10). Thus, we can implement a workaround by injecting the environment variable based on the process.env NodeJS variable content.

sonarcloud[bot] commented 7 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

github-actions[bot] commented 7 months ago

:tada: This PR is included in version 3.0.3 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

github-actions[bot] commented 7 months ago

:tada: This PR is included in version 3.0.3 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: