semantic-release / github

:octocat: semantic-release plugin to publish a GitHub release and comment on released Pull Requests/Issues
https://www.npmjs.com/package/@semantic-release/github
MIT License
424 stars 128 forks source link

Can't use variables in asset path #363

Open Andy-L opened 3 years ago

Andy-L commented 3 years ago

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.

kickapoo commented 3 years ago

Out of curiosity, why keeping in builds folder previous versions?

Andy-L commented 3 years ago

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.

michaelchambaud-eaton commented 2 months ago

Are there plans to ever support this?