From f50646dd7df64d2a94b577856c0d27089a83f10b Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 2 Apr 2026 23:40:27 +0000 Subject: [PATCH 1/3] fix(ci): replace deprecated `::set-output` with `$GITHUB_OUTPUT` The `::set-output` workflow command was deprecated by GitHub Actions in October 2022 and is being removed. This migrates release-type.py3 to write outputs to the `$GITHUB_OUTPUT` environment file instead. https://claude.ai/code/session_01DNUdELQ1xnVwtZbhdz3K9A --- ci/github-actions/release-type.py3 | 36 +++++++++++++++++------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/ci/github-actions/release-type.py3 b/ci/github-actions/release-type.py3 index 58c1f20b..218cc715 100755 --- a/ci/github-actions/release-type.py3 +++ b/ci/github-actions/release-type.py3 @@ -19,34 +19,38 @@ def dict_path(data, head: str, *tail: str): if not tail: return value return dict_path(value, *tail) +def set_output(name: str, value: str): + with open(environ['GITHUB_OUTPUT'], 'a') as fh: + print(f'{name}={value}', file=fh) + with open('Cargo.toml') as cargo_toml: data = toml.load(cargo_toml) version = dict_path(data, 'package', 'version') if version != release_tag: print(f'::warning ::RELEASE_TAG ({release_tag}) does not match Cargo.toml#package.version ({version})') - print('::set-output name=release_type::none') - print('::set-output name=is_release::false') - print('::set-output name=is_prerelease::false') - print(f'::set-output name=release_tag::{release_tag}') + set_output('release_type', 'none') + set_output('is_release', 'false') + set_output('is_prerelease', 'false') + set_output('release_tag', release_tag) exit(0) if re.match(r'^[0-9]+\.[0-9]+\.[0-9]+-.+$', release_tag): - print('::set-output name=release_type::prerelease') - print('::set-output name=is_release::true') - print('::set-output name=is_prerelease::true') - print(f'::set-output name=release_tag::{release_tag}') + set_output('release_type', 'prerelease') + set_output('is_release', 'true') + set_output('is_prerelease', 'true') + set_output('release_tag', release_tag) exit(0) if re.match(r'^[0-9]+\.[0-9]+\.[0-9]+$', release_tag): - print('::set-output name=release_type::official') - print('::set-output name=is_release::true') - print('::set-output name=is_prerelease::false') - print(f'::set-output name=release_tag::{release_tag}') + set_output('release_type', 'official') + set_output('is_release', 'true') + set_output('is_prerelease', 'false') + set_output('release_tag', release_tag) exit(0) -print('::set-output name=release_type::none') -print('::set-output name=is_release::false') -print('::set-output name=is_prerelease::false') -print(f'::set-output name=release_tag::{release_tag}') +set_output('release_type', 'none') +set_output('is_release', 'false') +set_output('is_prerelease', 'false') +set_output('release_tag', release_tag) exit(0) From 8528f35598bd7a84951cd7cc858d844d71eae365 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 2 Apr 2026 23:42:10 +0000 Subject: [PATCH 2/3] refactor(ci): rename ambiguous variable in release-type.py3 https://claude.ai/code/session_01DNUdELQ1xnVwtZbhdz3K9A --- ci/github-actions/release-type.py3 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/github-actions/release-type.py3 b/ci/github-actions/release-type.py3 index 218cc715..2968e49a 100755 --- a/ci/github-actions/release-type.py3 +++ b/ci/github-actions/release-type.py3 @@ -20,8 +20,8 @@ def dict_path(data, head: str, *tail: str): return dict_path(value, *tail) def set_output(name: str, value: str): - with open(environ['GITHUB_OUTPUT'], 'a') as fh: - print(f'{name}={value}', file=fh) + with open(environ['GITHUB_OUTPUT'], 'a') as output_file: + print(f'{name}={value}', file=output_file) with open('Cargo.toml') as cargo_toml: data = toml.load(cargo_toml) From 711d5ca842bb258dcfc1996aa9d280aab74436f6 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 2 Apr 2026 23:51:07 +0000 Subject: [PATCH 3/3] fix(ci): add guard for missing GITHUB_OUTPUT variable Consistent with existing environ checks for RELEASE_TAG and TARGET. https://claude.ai/code/session_01DNUdELQ1xnVwtZbhdz3K9A --- ci/github-actions/release-type.py3 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ci/github-actions/release-type.py3 b/ci/github-actions/release-type.py3 index 2968e49a..daa33e0f 100755 --- a/ci/github-actions/release-type.py3 +++ b/ci/github-actions/release-type.py3 @@ -19,8 +19,14 @@ def dict_path(data, head: str, *tail: str): if not tail: return value return dict_path(value, *tail) +github_output = environ.get('GITHUB_OUTPUT', None) + +if not github_output: + print('::error ::Environment variable GITHUB_OUTPUT is required but missing') + exit(1) + def set_output(name: str, value: str): - with open(environ['GITHUB_OUTPUT'], 'a') as output_file: + with open(github_output, 'a') as output_file: print(f'{name}={value}', file=output_file) with open('Cargo.toml') as cargo_toml: