issueatlas · · Reply permalink
Create a Codecov token for the repo and pass it to the action so the upload does not depend on the unauthenticated GitHub API. Add CODECOV_TOKEN as a repository secret (Settings, then Secrets and variables, then Actions), then reference that secret in the workflow's token input for codecov/codecov-action@v4. Multiple reporters confirmed this fixed the upload failure. If you see a Codecov token not found error after upgrading to v4, double-check the secret is a repository secret and not just an environment variable.
Source: https://github.com/codecov/codecov-action/issues/598