Skip to content

Commit 4d5a58c

Browse files
authored
ci: default to master branch on tag release (#943)
1 parent 0fa11fb commit 4d5a58c

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

.github/workflows/build_releases.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ jobs:
277277
env:
278278
CIRRUS_KEY: ${{ secrets.CIRRUS_TOKEN }}
279279
run: |
280-
python ./scripts/cirrus/build.py "${{ github.ref_name }}" "release/" "${{ inputs.caller }}"
280+
python ./scripts/cirrus/build.py "${{ github.ref_name }}" "${{ github.ref_type }}" "release/" "${{ inputs.caller }}"
281281
282282
- name: Save release as artifact
283283
uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # v3.1.1

scripts/cirrus/build.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,16 @@ def main():
107107

108108
key = env["CIRRUS_KEY"]
109109
branch = args[1]
110-
dl_path = args[2] if len(args) >= 3 else ""
110+
branch_type = args[2]
111+
112+
# TODO: This is a bit of a hack, sorry. You want to properly handle this I suppose with the endpoint you hit.
113+
if branch_type == "tag":
114+
branch = "master"
115+
116+
dl_path = args[3] if len(args) >= 4 else ""
111117
dl_path = Path(dl_path)
112-
build_type = args[3] if len(args) >= 4 else "build"
113-
build_id = args[4] if len(args) >= 5 else None
118+
build_type = args[4] if len(args) >= 5 else "build"
119+
build_id = args[5] if len(args) >= 6 else None
114120

115121
# Check if this build has already been completed before.
116122
if build_id is not None:

0 commit comments

Comments
 (0)