Details on how to create GitHub workflows can be found at https://docs.github.com/en/actions/using-workflows/about-workflows. I've used this recently and it gave me all the information I needed on how to build and managed workflows
With regards to publishing to GitHub Packages, details can be found at https://docs.github.com/en/packages/managing-github-packages-using-github-actions-workflows/publishing-and-installing-a-package-with-github-actions