un-ts / changesets-gitlab

GitLab CI cli for changesets like its GitHub Action.
https://opencollective.com/unts/projects/changesets-gitlab
MIT License
86 stars 33 forks source link

Usage of outputs #164

Closed meesvandongen closed 6 months ago

meesvandongen commented 6 months ago

The readme currently states outputs:

Outputs published - A boolean value to indicate whether a publishing is happened or not publishedPackages - A JSON array to present the published packages. The format is [{"name": "@xx/xx", "version": "1.2.0"}, {"name": "@xx/xy", "version": "0.8.9"}]

As I understand, this only makes sense in the context of github (github actions / set-output cli command).

However, internally the script also does

exportVariable('PUBLISHED', true)
exportVariable('PUBLISHED_PACKAGES', result.publishedPackages)

which is far more useful in the context of gitlab. Thus, I would suggest to update the readme to reflect this.

Which brings me to another point, the variable PUBLISHED is used as both input and output, which is problematic. Edit: this is of course not the case due to the INPUT_ prefix.

Here is a merge request which should clarify things https://github.com/un-ts/changesets-gitlab/pull/165

JounQin commented 6 months ago

Close via #165