1️⃣ Go to https://www.npmjs.com/settings/npm_account/tokens/new
2️⃣ Follow the instructions (select type "Automation"), and copy the generated token
3️⃣ Go to https://github.com/github_account/github_repo/settings
4️⃣ Under "Code and automation" > "Actions" > "General" > "Workflow permissions"
→ check "Read and write permissions"