cloudsmith-io / action

Github Action that uses the cloudsmith cli to interact with the Cloudsmith API (pushes, etc)
https://github.com/marketplace/actions/cloudsmith-push
MIT License
14 stars 12 forks source link

v0.6.2. Fails: saying that format has not been set. While this isn't correct #51

Closed Henry-Brinkman closed 2 months ago

Henry-Brinkman commented 2 months ago

Good afternoon!

Thank you for creating this action. We've using it quite a while, but we're seeing an error in the most recent version. It's saying that we're not setting format. Error: format is required, but not set (got: none)! But we've got it set to "npm" could you tell me if we're doing something wrong?

Thank you!

BartoszBlizniak commented 2 months ago

Hey @Henry-Brinkman - let me create an internal ticket to investigate this.

Henry-Brinkman commented 2 months ago

@BartoszBlizniak Thank you!

BartoszBlizniak commented 2 months ago

Hey @Henry-Brinkman - I just quickly tried to upload an NPM package using latest version and it pushed correctly. Are you happy to share the output from github and/or sample code of your .yaml file?

Henry-Brinkman commented 2 months ago

@BartoszBlizniak Thanks for trying. Yes, of course.

We're using this in a matrix, where we only publish affected libraries. - name: Push to cloudsmith uses: cloudsmith-io/action@master with: api-key: SECRET command: "push" format: "npm" owner: topicus-healthcare repo: viplive file: ${{ steps.create-package.outputs.package-name }} name: viplive-frontend-shared/${{ matrix.package }} republish: false And the output we're getting is: Error: format is required, but not set (got: none)!

BartoszBlizniak commented 2 months ago

@Henry-Brinkman - Thank you. I'm unfortunately unable to replicate the issue, would you have some time either today or tomorrow to run through this with me and perhaps we can try a quick debugging session? I'm based in the UK.

Henry-Brinkman commented 2 months ago

@BartoszBlizniak Sorry for the late response. Are you perhaps available on Thursday or Friday?

BartoszBlizniak commented 2 months ago

@BartoszBlizniak Sorry for the late response. Are you perhaps available on Thursday or Friday?

@Henry-Brinkman Let's do Thursday :) I'm on leave from Friday - any specific time that suits you?

Henry-Brinkman commented 2 months ago

@BartoszBlizniak Let's do it! I'm based in the Netherlands, are you available 2 PM CEST? :-) Thanks again for your help.

BartoszBlizniak commented 2 months ago

Awesome - @Henry-Brinkman scheduled!

Henry-Brinkman commented 2 months ago

uccessfully installed click-configfile-0.2.3 click-didyoumean-0.3.1 click-spinner-0.1.10 cloudsmith-api-2.0.13 cloudsmith-cli-1.2.3 configparser-7.0.0 python-dateutil-2.9.0.post0 requests-toolbelt-1.0.0 semver-3.0.2 Run bash /home/runner/work/_actions/cloudsmith-io/action/master/entrypoint.sh \ bash /home/runner/work/_actions/cloudsmith-io/action/master/entrypoint.sh \ -DSee https://github.com/topicushealthcare/***-frontend-shared/ \ -k \ -Kpush \ -fnpm \ -otopicus-healthcare \ -r \ -F-frontend-shared-avatar-2.0.0.tgz \ -Pfalse \ -wnone \ -Wfalse \ -dnone \ -Rnone \ -n-frontend-shared/avatar \ -Nnone \ -snone \ -Snone \ -Vnone \ -pnone \ -- none shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} env: NODE_VERSION: 18.x NX_BASE: origin/main~1 NX_HEAD: origin/main Error: format is required, but not set (got: none)!

Henry-Brinkman commented 2 months ago
  - name: Push to cloudsmith
    uses: cloudsmith-io/action@v0.5.3
    with:
      api-key: ${{ secrets.VIPLIVE_CLOUDSMITH_TOKEN }}
      command: "push"
      format: "npm"
      owner: topicus-healthcare
      repo: viplive
      file: ${{ steps.create-package.outputs.package-name }}
      name: viplive-frontend-shared/${{ matrix.package }}
      republish: false
      description: "See https://github.com/topicushealthcare/viplive-frontend-shared/"
thevideoobservatory commented 2 months ago

I also hit this. Pinning v0.5.3 worked for me.

BartoszBlizniak commented 2 months ago

Hey @Henry-Brinkman / @thevideoobservatory - thank you for the input, I'm just back from my PTO and taking a look into this.

Taking a further look, the issue is related to the "description" parameter. The older versions of the GHA ignored the field and realistically didn't do anything for all formats apart from "Raw", to fix this issue on the latest version, please remove the "description" field and it should work as intended.

Apologies for the inconvenience that this has caused.

Henry-Brinkman commented 2 months ago

@BartoszBlizniak Thank you for your help! That seems to work!