go-semantic-release / hooks-goreleaser

🚢 GoReleaser hooks plugin
MIT License
4 stars 1 forks source link

GitLab package uploads don't seem to be working #2

Closed jamietanna closed 11 months ago

jamietanna commented 1 year ago

Releases to GitLab Package Registry, when configured with a "Project Access Token" (api, write_repository, write_registry), do not seem to be occuring. The Release in GitLab is updated, but no changes appear in the Package Registry

Repo: https://gitlab.com/tanna.dev/dmd-go-semver

{
  "plugins": {
    "commit-analyzer": {
      "name": "default@^1.11.0"
    },
    "ci-condition": {
      "name": "default"
    },
    "changelog-generator": {
      "name": "default",
      "options": {
        "emojis": "true"
      }
    },
    "provider": {
      "name": "gitlab",
      "options": {
        "gitlab_projectid": "44435308"
      }
    }
  }
}

Goreleaser config:

# ...
gitlab_urls:
  use_package_registry: true

Example build that isn't publishing: https://gitlab.com/tanna.dev/dmd-go-semver/-/jobs/3960632267

christophwitzko commented 1 year ago

Hmm, I am not sure what is causing this. Here is a working example of go-semantic-release on GitLab: https://gitlab.com/go-semantic-release/example-go-application

Maybe this helps ☺️

jamietanna commented 11 months ago

Sorry, just coming back to this - do you know how the GITLAB_TOKEN for :point_up: was defined? Is it a https://docs.gitlab.com/ee/user/project/settings/project_access_tokens.html or a per-user Personal Access Token?

jamietanna commented 11 months ago

Interestingly, with https://gitlab.com/tanna.dev/dmd-go-semver/-/releases/v1.3.2 (no longer setting use_package_registry and using a Project Access Token) I still don't see artifacts uploaded :thinking:

christophwitzko commented 11 months ago

I created a Personal Access Token for this project with the api scope.

jamietanna commented 11 months ago

Interesting. I've just tried https://gitlab.com/tanna.dev/dmd-go-semver/-/releases/v1.3.3 (using a Personal Access Token with api and a few other scopes) and that has not uploaded anything to the release :thinking:

jamietanna commented 11 months ago

Looks like there may have been some config issues in my .goreleaser.yaml :upside_down_face:

Just retrying with a more realistic config, then will see if the Project vs Personal Access Token is coming into play at all

jamietanna commented 11 months ago

OK, yep, this looks like complete user error, on the side of my .goreleaser.yaml config being a bit suspicious!

Thanks for the help diagnosing it!