github
github copied to clipboard
Can't use variables in asset path
I'm trying to filter assets to only those that match the new version, e.g.:
plugins:
- '@semantic-release/commit-analyzer'
- '@semantic-release/release-notes-generator'
- - '@semantic-release/github'
- assets:
- {"path": '**/build/libs/*${nextRelease.version}*.jar'}
but I just get an error:
[1:56:24 PM] [semantic-release] [@semantic-release/github] › ✖ The asset **/build/libs/*${nextRelease.version}*.jar cannot be read, and will be ignored.
I tried escaping the braces,
e.g. {"path": '**/build/libs/*$\{nextRelease.version\}*.jar'}
and alternate lodash syntax,
e.g. {"path": '**/build/libs/*<%= nextRelease.version %>*.jar'}
but with the same results.
Out of curiosity, why keeping in builds folder previous versions?
First we create a build with which to run tests (using a snapshot version). Only if the tests pass do we run semantic-release to repackage with the generated version and publish the release.