Skip to content

Commit

Permalink
Fix tag builds
Browse files Browse the repository at this point in the history
  • Loading branch information
TheAssassin committed Jul 6, 2021
1 parent b07f468 commit 6f9fa67
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions pyuploadtool/build_systems/github_actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,20 @@ def update_release_metadata(self, metadata: ReleaseMetadata):
event_name = self.event_name.lower()

# the create event can occur whenever a tag or branch is created
if event_name == "create" and metadata.tag:
metadata.build_type = BuildType.TAG
if event_name == "pull_request":
metadata.build_type = BuildType.PULL_REQUEST
if event_name == "push":
metadata.build_type = BuildType.PUSH
if event_name == "schedule":

elif event_name == "push":
if metadata.tag:
metadata.build_type = BuildType.TAG
else:
metadata.build_type = BuildType.PUSH

elif event_name == "schedule":
metadata.build_type = BuildType.SCHEDULED
if event_name in ["workflow_dispatch", "repository_dispatch"]:

elif event_name in ["workflow_dispatch", "repository_dispatch"]:
metadata.build_type = BuildType.MANUAL

else:
raise BuildSystemError("Could not detect build type or build type is unsupported")

0 comments on commit 6f9fa67

Please sign in to comment.