actions/delete-package-versions

Error: get versions API failed. Package not found.

stephanpelikan opened this issue · 2 comments

I use delete-package-versions to remove NPM packages of previous builds. If there is no package left, then not only the version is gone but also the entire NPM package is gone. That is not necessarily a problem, but on rerunning builds which fail (after committing a fix) the delete-package-versions also fails since the entire package is not found:

Run actions/delete-package-versions@v4.1.1
  with:
    package-name: my-awesome-library
    package-type: npm
    min-versions-to-keep: 0
    ignore-versions: ^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)$
    num-old-versions-to-delete: 1
    delete-only-pre-release-versions: false
    delete-only-untagged-versions: false
    token: ***
  env:
    NODE_AUTH_TOKEN: XXXXX-XXXXX-XXXXX-XXXXX
Error: get versions API failed. Package not found.

Can you please treat this edge-case as there were no versions to delete?

One could split in several jobs and use needs and continue-on-error keys to "bypass" this behaviour.

Nice. Works like a charm.