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.
This commit is contained in:
xixu-me committed 2025-06-01 00:55:16 +08:00
1 parent 40eae4df14
commit 841b8973bd
1 file changed
+3 -2
+3 -2
View File
@@ -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