quicksilver / Quicksilver

Quicksilver Project Source
http://qsapp.com
Apache License 2.0
2.72k stars 283 forks source link

Pushing tag doesn't build a release #2879

Closed pjrobertson closed 2 years ago

pjrobertson commented 2 years ago

This one's for @n8henrie - I've just tried pushing a v2.2.0 tag a couple of times, but no action is triggered to build a release.

Any ideas what's changed in the CI, or am I doing something wrong?

git tag -a "v2.2.0" -m "Version 2.2.0 of Quicksilver, for full list of changes, see: https://qsapp.com/changelog.php"
git push origin v2.2.0   
n8henrie commented 2 years ago

Hmmm, I don't see anything obvious. Was wondering if it has something to do with the master -> main change, but I can't find anything to this effect.

It appears in the tags: https://github.com/quicksilver/Quicksilver/tags

You can see in the run that three jobs seem to have been skipped:

Looking at the workflow file, all three of those disabled items are conditional upon if: startsWith(github.ref, 'refs/tags/').

Hmmm...

n8henrie commented 2 years ago

Just tried a delete / re-tag / force push to see if perhaps this will trigger a re-run and this was a transient issue?

EDIT: Didn't work

n8henrie commented 2 years ago

Some debugging on a test repo: https://github.com/n8henrie/killed-9-example/actions

Looks like the issue is with the branches filter @pjrobertson added in these commits:

$ git log -Gbranches-ignore
commit 4a41a5551bc2c1e6aa680de7d239680adef6c42a
Author: Patrick Robertson <robertson.patrick@gmail.com>
Date:   Tue May 3 00:30:48 2022 +0800

    Also don't run CI on pushes to branches that start with translations_

commit 17ad14699ef6c8c429f68027ac9fa5119fbf312a
Author: Patrick Robertson <robertson.patrick@gmail.com>
Date:   Tue May 3 00:19:16 2022 +0800

    Don't run CI on transifex branches

I don't see why, but the steps filtered by github.ref for tags run fine without the branches-filter but are skipped entirely when a branches-filter is in place: https://github.community/t/github-action-for-master-branch-and-ignore-all-tags-and-first-level-of-files/172557/4

Not sure where / if this is documented behavior.

Actually, looks like it's here: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#using-filters

For example, the push event has a branches filter that causes your workflow to run only when a push to a branch that matches the branches filter occurs, instead of when any push occurs.

If you specify activity types or filters for an event and your workflow triggers on multiple events, you must configure each event separately. You must append a colon (:) to all events, including events without configuration.

https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-including-branches-and-tags

Ok, for some reason, adding

push:
    tags:

is insufficient, and some kind of glob is required. Since our release tags are all starting with v, I'm adding a glob for v* and will re-push v2.2.0. Alternatively, we could glob for all tags: * and filter the Release actions using the github.ref logic, but I think this should be okay for now.

Looks fixed: https://github.com/quicksilver/Quicksilver/actions/runs/2363400762

Unfortunately someone re-pushed the v0.0.1 that I had deleted locally, so my unfiltered git push --tags re-added them, so I'll re-delete them again. (https://github.com/quicksilver/Quicksilver/issues/2714)

pjrobertson commented 2 years ago

Thanks for the debugging! So it looks like it was my doing? :'( sorry about that!

Great to have this fixed.

Unfortunately someone re-pushed the v0.0.1 that I had deleted locally, so my unfiltered git push --tags re-added them, so I'll re-delete them again. (https://github.com/quicksilver/Quicksilver/issues/2714)

Probably me again. I've just checked and I did have a local v0.0.1 - it's since been deleted.

Thanks!