Look further back in history?
Hey
I'm working on an Actions workflow to gather some information about PRs that were merged in a particular release, triggered by the creation of a new tag.
So for example if I tag 1.1 I would want to be able to run some git commands that specify a range of 1.0..1.1.
This action is excellent for getting the 1.1, but AFAICT I can't use it to figure out what the tag before that was (ie the 1.0).
Is that something that could be added?
That should be possible, does git support this out of the box? If so how? Otherwise, we could look at regexp or another way of matching.
Just to complete idea of what you're trying to do: You have several version branches like 1.1.x, 1.x.x, 1.0.x`. And you went per branch to get the previous tag for that range was? (This is the thing I want to do in the end on my own repo's, so if that idea matches with yours that would;d be awesome.)
I ended up with this incantation:
- name: Get previous tag name
id: previous_tag
run: echo "::set-output name=TAGNAME::$(git describe --abbrev=0 --tags $(git rev-list --tags --skip=1 --max-count=1))"
which seems to work, but I don't do a lot of complicated branching.
Ow nice one, might add the skip to the action :+1: