Skip to content
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

Asking for github authentification when using semantic-release/gitlab with npm workspaces #156

Open
MargotDumoulin opened this issue May 17, 2024 · 1 comment

Comments

@MargotDumoulin
Copy link

Hi,

I'm using semantic-release-monorepo with semantic-release/gitlab and npm workspaces.
When doing so, I get an error saying that I need to give credentials for semantic-release/github which tries to load even though I don't use the plugin.

Here is my .releaserc.json :

{
  "branches": ["main"],
  "plugins": [
    "@semantic-release/commit-analyzer",
    "@semantic-release/release-notes-generator",
    "@semantic-release/gitlab",
    [
      "@semantic-release/exec",
      {
        "verifyReleaseCmd": "echo VERSION=${nextRelease.version} > build.env"
      }
    ]
  ],
  "extends": "semantic-release-monorepo"
}

Here goes the error :

$ npm exec -w [myworkspace] -- semantic-release --dry-run
[11:07:01 AM] [semantic-release] › ℹ  Running semantic-release version 23.1.1
[11:07:01 AM] [semantic-release] › ✔  Loaded plugin "verifyConditions" from "@semantic-release/npm"
[11:07:01 AM] [semantic-release] › ✔  Loaded plugin "verifyConditions" from "@semantic-release/github"
[11:07:01 AM] [semantic-release] › ✔  Loaded plugin "analyzeCommits" from "@semantic-release/commit-analyzer"
[11:07:01 AM] [semantic-release] › ✔  Loaded plugin "generateNotes" from "@semantic-release/release-notes-generator"
[11:07:01 AM] [semantic-release] › ✔  Loaded plugin "prepare" from "@semantic-release/npm"
[11:07:01 AM] [semantic-release] › ✔  Loaded plugin "publish" from "@semantic-release/npm"
[11:07:01 AM] [semantic-release] › ✔  Loaded plugin "publish" from "@semantic-release/github"
[11:07:01 AM] [semantic-release] › ✔  Loaded plugin "addChannel" from "@semantic-release/npm"
[11:07:01 AM] [semantic-release] › ✔  Loaded plugin "addChannel" from "@semantic-release/github"
[11:07:01 AM] [semantic-release] › ✔  Loaded plugin "success" from "@semantic-release/github"
[11:07:01 AM] [semantic-release] › ✔  Loaded plugin "fail" from "@semantic-release/github"
[11:07:04 AM] [semantic-release] › ⚠  Run automated release from branch main on repository xxx in dry-run mode
[11:07:05 AM] [semantic-release] › ✔  Allowed to push to the Git repository
[11:07:05 AM] [semantic-release] › ℹ  Start step "verifyConditions" of plugin "@semantic-release/npm"
[11:07:05 AM] [semantic-release] › ✔  Completed step "verifyConditions" of plugin "@semantic-release/npm"
[11:07:05 AM] [semantic-release] › ℹ  Start step "verifyConditions" of plugin "@semantic-release/github"
[11:07:05 AM] [semantic-release] [@semantic-release/github] › ℹ  Verify GitHub authentication
[11:07:05 AM] [semantic-release] › ✘  Failed step "verifyConditions" of plugin "@semantic-release/github"
[11:07:05 AM] [semantic-release] › ⚠  Skip step "fail" of plugin "@semantic-release/github" in dry-run mode
[11:07:05 AM] [semantic-release] › ✘  ENOGHTOKEN No GitHub token specified.
A GitHub personal token must be created and set in the GH_TOKEN or GITHUB_TOKEN environment variable on your CI environment.

Please make sure to create a GitHub personal token and to set it in the GH_TOKEN or GITHUB_TOKEN environment variable on your CI environment. The token must allow to push to the repository xxx

Am I doing something wrong here?
Are npm workspaces supported?

@alko89
Copy link

alko89 commented May 31, 2024

I had the same issue. Adding -e @semantic-release/gitlab-config to your run config seems to have fixed it.

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

2 participants