How can we create custom github actions annotations?

I am generating an artifact after github actions runs a certain code snippet. The main goal is to show those artifacts as warnings in the github actions, This Run section.

How can we achieve results as in the image?

See this post:

What is your reason to add artifact URLs in the form of annotations though?

@Simran-B Actually I am trying to implement an auto spell check bot using Language tool. But it provides multiple suggestions for incorrect spellings. So, I am trying to show those options through github annotations pointing to the specific columns on the particular lines.

I see. Keep the rather low limit of annotations in mind, 10 per step and 50 per job. Might be better to generate a report after all.

@Simran-B Thank you for the response. Could you suggest me a better way to implement it such that the manual correction part becomes easy?

You could save it to a file and add it as build artifact: Uploading build and test artifacts

The downside is that you have to download the artifact and unpack it.

Another approach would be to add a separate step or job which writes the entire spell check report to the workflow log. You could optionally make use of log grouping to improve readability.