git icon indicating copy to clipboard operation
git copied to clipboard

var on assets path ?

Open jeremybep opened this issue 3 years ago • 1 comments

I can't find a simple way to use the package name to create a path. In order to use it as an asset.

here is a part 'prepare' of .releaserc.yml

prepare:
  - path: '@semantic-release/exec'
    prepareCmd: "echo '__version__ = \"${nextRelease.version}\"' > $CI_PROJECT_NAME/version.py"
  - path: '@semantic-release/changelog'
    # Create or update the changelog file in the local project repository
  - path: '@semantic-release/git'
    # Push a release commit and tag, including version files
    # Do not forget to put `[skip ci]` to avoid CI/CD infinite loop
    message: 'chore(release): ${nextRelease.version} [skip ci]'
    assets: ['CHANGELOG.md', '$CI_PROJECT_NAME/version.py']

Here : assets: ['CHANGELOG.md', '$CI_PROJECT_NAME/version.py'] i cant' use env var like this, there is another way ?

Note: prepareCmd work well with $CI_PROJECT_NAME.

jeremybep avatar Feb 24 '22 19:02 jeremybep

+1 github plugin implementation : see https://github.com/semantic-release/github/pull/218

mctd avatar Jul 08 '22 16:07 mctd