Skip to content

Commit

Permalink
CI: allow tags named v1.2.3-beta (#5593)
Browse files Browse the repository at this point in the history
... so that we can make alpha/beta/... releases
  • Loading branch information
fingolfin committed Jan 17, 2024
1 parent 6911f48 commit e94438a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ on:
workflow_dispatch:
pull_request:
push:
tags: v[1-9]+.[0-9]+.[0-9]+
tags:
- v[1-9]+.[0-9]+.[0-9] # allow v1.2.3
- v[1-9]+.[0-9]+.[0-9]-* # allow v1.2.3-beta3 etc.
branches:
- master
- stable-*
Expand Down
5 changes: 3 additions & 2 deletions dev/releases/make_github_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

TAG_NAME = sys.argv[1]
PATH_TO_RELEASE = sys.argv[2]
VERSION = TAG_NAME[1:] # strip 'v' prefix

utils.verify_git_clean()
utils.verify_is_possible_gap_release_tag(TAG_NAME)
Expand All @@ -43,7 +44,7 @@
utils.error(f"Github release with tag '{TAG_NAME}' already exists!")

# Create release
RELEASE_NOTE = f"For an overview of changes in GAP {TAG_NAME[1:]} see the " \
RELEASE_NOTE = f"For an overview of changes in GAP {VERSION} see the " \
+ f"[CHANGES.md](https://github.com/gap-system/gap/blob/{TAG_NAME}/CHANGES.md) file."
utils.notice(f"Creating release {TAG_NAME}")
RELEASE = utils.CURRENT_REPO.create_git_release(TAG_NAME, TAG_NAME,
Expand All @@ -60,7 +61,7 @@
print(filename)

# Now check that TAG_NAME and the created archives belong together
main_archive_name = "gap-" + TAG_NAME[1:] + ".tar.gz"
main_archive_name = "gap-" + VERSION + ".tar.gz"
if not main_archive_name in manifest:
utils.error(f"Expected to find {main_archive_name} in MANIFEST, but did not!")

Expand Down
2 changes: 1 addition & 1 deletion dev/releases/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def run_with_log(args, name, msg = None):
error(msg+" failed. See "+name+".log.")

def is_possible_gap_release_tag(tag):
return re.fullmatch( r"v[1-9]+\.[0-9]+\.[0-9]+", tag) != None
return re.fullmatch( r"v[1-9]+\.[0-9]+\.[0-9]+(-.+)?", tag) != None

def verify_is_possible_gap_release_tag(tag):
if not is_possible_gap_release_tag(tag):
Expand Down

0 comments on commit e94438a

Please sign in to comment.