File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed
Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1313- Update README.md examples to use v2.0.0 and document breaking changes from v1.x
1414
1515### Fixed
16+ - Fix deprecated GitHub Actions ::set-output command usage to use new GITHUB_OUTPUT environment file format
1617
1718## 2.0.0 - 2025-08-07
1819### New
Original file line number Diff line number Diff line change @@ -492,9 +492,18 @@ def main() -> int:
492492
493493 # Output for GitHub Actions
494494 if args .github_action_mode :
495- print (f"::set-output name=package-file::{ output_file } " )
496- print (f"::set-output name=package-name::{ builder .config ['name' ]} " )
497- print (f"::set-output name=package-size::{ builder ._format_size (output_file .stat ().st_size )} " )
495+ import os
496+ github_output = os .environ .get ('GITHUB_OUTPUT' )
497+ if github_output :
498+ with open (github_output , 'a' ) as f :
499+ f .write (f"package-file={ output_file } \n " )
500+ f .write (f"package-name={ builder .config ['name' ]} \n " )
501+ f .write (f"package-size={ builder ._format_size (output_file .stat ().st_size )} \n " )
502+ else :
503+ # Fallback for local testing or non-GitHub environments
504+ print (f"package-file={ output_file } " )
505+ print (f"package-name={ builder .config ['name' ]} " )
506+ print (f"package-size={ builder ._format_size (output_file .stat ().st_size )} " )
498507
499508 return 0
500509
You can’t perform that action at this time.
0 commit comments