In our current state, there can be a situation when the package was published, but PR with the new version wasn't merged into master. This can be changed using this technic: https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#running-your-pull_request-workflow-when-a-pull-request-merges