From 841b8973bd03433eb13bf94e1bebcb0b2ba02ca9 Mon Sep 17 00:00:00 2001 From: Xi Xu Date: Sun, 1 Jun 2025 00:55:16 +0800 Subject: [PATCH] Update CI script to use GITHUB_OUTPUT Modified the CI workflow to write the version output to the GITHUB_OUTPUT file instead of using the deprecated 'set-output' command. Added 'os' module import to support this change. --- .github/workflows/ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 01a2813..0d2140b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -123,7 +123,7 @@ jobs: run: | pip install requests python -c " - import requests, json + import requests, json, os try: data = requests.get('https://pypi.org/pypi/tzst/json').json() version = data['info']['version'] @@ -131,7 +131,8 @@ jobs: except Exception as e: print(f'Error fetching version: {e}') version = 'unknown' - print(f'::set-output name=version::{version}') + with open(os.environ['GITHUB_OUTPUT'], 'a') as f: + f.write(f'version={version}\n') " - name: Update README badge