From b1ea121d5306132f291013a61e4272ab4f510da5 Mon Sep 17 00:00:00 2001 From: Christian Schwarz Date: Sun, 15 Feb 2026 18:32:47 +0000 Subject: [PATCH] release: artifact download: source from circleci --- .circleci/download_artifacts.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.circleci/download_artifacts.py b/.circleci/download_artifacts.py index 809d9c3..ef4da20 100644 --- a/.circleci/download_artifacts.py +++ b/.circleci/download_artifacts.py @@ -7,13 +7,21 @@ import requests import time import os +import yaml import argparse from pathlib import Path circle_token = os.environ.get('CIRCLE_TOKEN') if not circle_token: - raise ValueError('CIRCLE_TOKEN environment variable not set') + cli_yml = Path.home() / ".circleci" / "cli.yml" + if cli_yml.exists(): + with open(cli_yml) as f: + data = yaml.safe_load(f) + if data: + circle_token = data.get("token") +if not circle_token: + raise ValueError('CIRCLE_TOKEN not set and no token found in ~/.circleci/cli.yml') parser = argparse.ArgumentParser(description='Download artifacts from CircleCI') parser.add_argument('build_num', type=str, help='Build number')