Skip to content

Commit 45c8f97

Browse files
committed
dont use set-output anymore
1 parent 7b66f78 commit 45c8f97

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff 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

mkp-builder.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)