Fix CI upload assets tag matching

The previous version would search for the last tag by matching the
beginning of the tag name. By explicitly searching for the trailing `"`
with grep, an exact tag match is now enforced.

Since releases like v1.2.3 always match the beginning of their RCs
(v1.2.3-rc4), this makes sure that the assets aren't pushed to the
previous release.
This commit is contained in:
Christian Duerr 2020-11-25 01:31:21 +00:00 committed by GitHub
parent e1246c3ea9
commit 26479bb9f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -35,7 +35,7 @@ upload_url=$(\
2> /dev/null \
| grep -E "(upload_url|tag_name)" \
| paste - - \
| grep -e "tag_name\": \"$tag" \
| grep -e "tag_name\": \"$tag\"" \
| head -n 1 \
| sed 's/.*\(https.*assets\).*/\1/' \
)