Skip to content

Can't use variables in asset path #363

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Andy-L opened this issue Apr 30, 2021 · 3 comments
Open

Can't use variables in asset path #363

Andy-L opened this issue Apr 30, 2021 · 3 comments

Comments

@Andy-L
Copy link

Andy-L commented Apr 30, 2021

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
Copy link

kickapoo commented May 1, 2021

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

@Andy-L
Copy link
Author

Andy-L commented May 3, 2021

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
Copy link

michaelchambaud-eaton commented Oct 2, 2024

Are there plans to ever support this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants