We’ve spent quite some time trying to figure out how to create a workflow that will only be run for commits that are both on master and tagged with
v* in order to identify release commits.
The workflow we have in mind for creating releases is as follows:
Merge the current
masterbranch into it
Bump the version within the code
Commit the changes
Add a tag containing the version number (prefixed with v)
Push and open pull request to
Go through normal review workflow keeping the tag at the branch head
Once everything is fine, the branch (along with the tag) will be merged into master which is then supposed to trigger publishing a release both to github and pypi.
If you’re interested, our project is:
The filter variants we’ve tried are:
on: push: branches: - master tags: - v* on: push: tags: - v* branches-ignore: - "*" - "!master" on: push: tags: - v* branches-ignore: - "!master" on: push: branches: - master -"refs/tags/v\*"
We’re now falling back to a solution where the workflow itself fails when the conditions are not met. How do other people do this? I know there is a release draft option but there is so much you can miss in a release code wise that we’d like to enforce reviews and tests on it before it’s actually published.