summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClement Tsang <34804052+ClementTsang@users.noreply.github.com>2022-12-31 21:50:17 -0500
committerGitHub <noreply@github.com>2022-12-31 21:50:17 -0500
commit4d5a58c3eced02189b70ecfdae4dc600b98d20c2 (patch)
tree3160245e72640c7996917d13c89eacc4cb9e3c3a
parent0fa11fb5c554b72afbdbe6e0c507ff1d31ac8880 (diff)
ci: default to master branch on tag release (#943)0.7.0
-rw-r--r--.github/workflows/build_releases.yml2
-rw-r--r--scripts/cirrus/build.py12
2 files changed, 10 insertions, 4 deletions
diff --git a/.github/workflows/build_releases.yml b/.github/workflows/build_releases.yml
index 833b68a5..d062a98b 100644
--- a/.github/workflows/build_releases.yml
+++ b/.github/workflows/build_releases.yml
@@ -277,7 +277,7 @@ jobs:
env:
CIRRUS_KEY: ${{ secrets.CIRRUS_TOKEN }}
run: |
- python ./scripts/cirrus/build.py "${{ github.ref_name }}" "release/" "${{ inputs.caller }}"
+ python ./scripts/cirrus/build.py "${{ github.ref_name }}" "${{ github.ref_type }}" "release/" "${{ inputs.caller }}"
- name: Save release as artifact
uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # v3.1.1
diff --git a/scripts/cirrus/build.py b/scripts/cirrus/build.py
index 15c047e9..0499d91a 100644
--- a/scripts/cirrus/build.py
+++ b/scripts/cirrus/build.py
@@ -107,10 +107,16 @@ def main():
key = env["CIRRUS_KEY"]
branch = args[1]
- dl_path = args[2] if len(args) >= 3 else ""
+ branch_type = args[2]
+
+ # TODO: This is a bit of a hack, sorry. You want to properly handle this I suppose with the endpoint you hit.
+ if branch_type == "tag":
+ branch = "master"
+
+ dl_path = args[3] if len(args) >= 4 else ""
dl_path = Path(dl_path)
- build_type = args[3] if len(args) >= 4 else "build"
- build_id = args[4] if len(args) >= 5 else None
+ build_type = args[4] if len(args) >= 5 else "build"
+ build_id = args[5] if len(args) >= 6 else None
# Check if this build has already been completed before.
if build_id is not None: