qiwi / multi-semantic-release

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

Non Github Repos #51

Open hayesmaker opened 3 years ago

hayesmaker commented 3 years ago

How do you pass the verifyConditions step when using Bitbucket repo instead of Github?

I have created a bit bucket personal access token and set my GITHUB_TOKEN env var to that. But multi-semantic-release keeps failing saying I haven't set my GITHUB_TOKEN. Is this project depending on using Github for this? How do I configure this to accept Bitbucket?

[10:56:44] [@isode-common/widgets] › ✔  Allowed to push to the Git repository
[10:56:44] [@isode-common/widgets] › ℹ  Start step "verifyConditions" of plugin "Inline plugin"
[10:56:44] [@isode-common/i18n] › ✖  Failed step "verifyConditions" of plugin "Inline plugin"
[10:56:44] [@isode-common/i18n] › ⚠  Skip step "fail" of plugin "@semantic-release/github" in dry-run mode
[10:56:44] [@isode-common/i18n] › ✖  EINVALIDGHTOKEN Invalid GitHub token.
The GitHub token configured in the GH_TOKEN or GITHUB_TOKEN environment variable must be a valid personal token allowing to push to the repository com/frontend-common-libs.

Please make sure to set the GH_TOKEN or GITHUB_TOKEN environment variable in your CI with the exact value of the GitHub personal token.

[multi-semantic-release]: AggregateError: 
    SemanticReleaseError: Invalid GitHub token.
SperWalas commented 2 years ago

Semantic-Release uses the @semantic-release/github plugin by default. (Cf documentation) I managed to fix this issue by overriding the plugin list in my .releaserc.yml config:

plugins:
  - '@semantic-release/commit-analyzer'
  - '@semantic-release/release-notes-generator'
  - '@semantic-release/npm'
  - '@semantic-release/gitlab' # Override the default @semantic-release/github plugin

I'm not aware of any Bitbucket plugin though. I guess you still can do it by using the @semantic-release/git plugin.