dhoulb / multi-semantic-release

Proof of concept that wraps semantic-release to work with monorepos.
BSD Zero Clause License
202 stars 37 forks source link

Bug or Feature Request: Publish GitHub tags with own files (dist) instead of whole project #91

Open dalisoft opened 2 years ago

dalisoft commented 2 years ago

Currently publishing Git releases & tags with separate tags but includes whole repository ZIP file with it's attached

antongolub commented 2 years ago

Hey, @dalisoft,

It's hard to say what’s going wrong.

  1. Multisemrel passes the pkg path as cwd option for each semrel process. https://github.com/dhoulb/multi-semantic-release/blob/118a894cd88d8e343dc54d4c2d005540c70172d1/lib/multiSemanticRelease.js#L202

  2. Semrel uses cwd for its context. https://github.com/semantic-release/semantic-release/blob/971a5e0d16f1a32e117e9ce382a1618c8256d0d9/index.js#L248

  3. The plugin invokes glob with the same cwd value. https://github.com/semantic-release/github/blob/a283229652f180834b76734b87a613994c72ce06/lib/glob-assets.js#L28

As a workaround, I suggest specifying the paths in the plugin config. https://github.com/semantic-release/github#usage

{
  "plugins": [
    "@semantic-release/commit-analyzer",
    "@semantic-release/release-notes-generator",
    ["@semantic-release/github", {
      "assets": [
        {"path": "dist/asset.min.css", "label": "CSS distribution"},
      ]
    }],
  ]
}
dalisoft commented 2 years ago

@antongolub Thank you a lot for trying help, you can try this repo as testing, locally i have used multi-semantic-release and results are same. Seems this issue not much bug, it's more like help as even semantic-release, semantic-release-monorepo and similar tools also does same bug, but if your tool can do this right, it could be much much better than others.

For example,

It's possible include only related package files?

Thank you