[Feature Request] Github Actions: Separate build and release workflows; allow creating versioned releases from tags
Description
Motivation
As I evolve my keymap, I might find a bug in the latest version or find that the lastest is not actually the greatest, so I want to go back to a previous release that I know to be good. Basically I want to properly use GitHub's "releases" feature with different compiled firmwares including links to their source code version.
Feature description
In my fork of this repo I have set up the actions so that every commit does a compile, which I use mainly to find errors and problems. Once I have made all the changes and fixed the problems, I will push a git tag to the repository (or create it using the GitHub UI). This will trigger a "build and publish" workflow and create a new release and attaches the build firmware there. It'll also automatically link the tag. I then go and write some release notes.
Implementation
I think that copying my GH Action Workflow to this repo should work for everyone: https://github.com/matey-jack/qmk_userspace_iris_cozy_keymap/blob/main/.github/workflows/build-on-push.yaml
I don't see any drawbacks to it, but still creating this ticket as a way to get feedback before creating the PR.
I think that copying my GH Action Workflow to this repo should work for everyone:
No, thats not going to work. The workflows are intentionally configured so that the logic is encapsulated elsewhere. This allows us to fix issues and whatnot, without users having to merge/rebase their qmk_userspace repo.
It also does not interact correctly with the existing workflow logic https://github.com/qmk/.github/blob/main/.github/workflows/qmk_userspace_publish.yml#L34, where it will still run and create a tag. If the main aim is to create a "named" release from a pushed tag, then i would expect the publish workflow to be updated to set the release name based on the event.