-
Notifications
You must be signed in to change notification settings - Fork 31
use Env variables for output #504
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates the GitHub Actions workflow to use the new $GITHUB_OUTPUT environment file method instead of the deprecated ::set-output command for setting output variables.
Key Changes:
- Replaced three instances of the deprecated
::set-outputcommand syntax with$GITHUB_OUTPUTenvironment file syntax - Applied to checksum calculations for RadarSDK, RadarSDKMotion, and RadarSDKIndoors XCFrameworks
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - name: Get SHA256 checksum (RadarSDK) | ||
| id: checksum_radarsdk | ||
| run: echo "::set-output name=checksum::$(shasum -a 256 RadarSDK.xcframework.zip | cut -d ' ' -f 1)" | ||
| run: echo "{checksum}={$(shasum -a 256 RadarSDK.xcframework.zip | cut -d ' ' -f 1)}" >> $GITHUB_OUTPUT |
Copilot
AI
Nov 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The syntax for setting output variables using $GITHUB_OUTPUT is incorrect. The format should use = to separate the key and value, not curly braces. Additionally, the command substitution should not have curly braces around it.
The correct syntax is:
echo "checksum=$(shasum -a 256 RadarSDK.xcframework.zip | cut -d ' ' -f 1)" >> $GITHUB_OUTPUTInstead of:
echo "{checksum}={$(shasum -a 256 RadarSDK.xcframework.zip | cut -d ' ' -f 1)}" >> $GITHUB_OUTPUT| - name: Get SHA256 checksum (RadarSDKMotion) | ||
| id: checksum_radarsdkmotion | ||
| run: echo "::set-output name=checksum::$(shasum -a 256 RadarSDKMotion.xcframework.zip | cut -d ' ' -f 1)" | ||
| run: echo "{checksum}={$(shasum -a 256 RadarSDKMotion.xcframework.zip | cut -d ' ' -f 1)}" >> $GITHUB_OUTPUT |
Copilot
AI
Nov 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The syntax for setting output variables using $GITHUB_OUTPUT is incorrect. The format should use = to separate the key and value, not curly braces. Additionally, the command substitution should not have curly braces around it.
The correct syntax is:
echo "checksum=$(shasum -a 256 RadarSDKMotion.xcframework.zip | cut -d ' ' -f 1)" >> $GITHUB_OUTPUTInstead of:
echo "{checksum}={$(shasum -a 256 RadarSDKMotion.xcframework.zip | cut -d ' ' -f 1)}" >> $GITHUB_OUTPUT| - name: Get SHA256 checksum (RadarSDKIndoors) | ||
| id: checksum_radarsdkindoors | ||
| run: echo "::set-output name=checksum::$(shasum -a 256 RadarSDKIndoors.xcframework.zip | cut -d ' ' -f 1)" | ||
| run: echo "{checksum}={$(shasum -a 256 RadarSDKIndoors.xcframework.zip | cut -d ' ' -f 1)}" >> $GITHUB_OUTPUT |
Copilot
AI
Nov 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The syntax for setting output variables using $GITHUB_OUTPUT is incorrect. The format should use = to separate the key and value, not curly braces. Additionally, the command substitution should not have curly braces around it.
The correct syntax is:
echo "checksum=$(shasum -a 256 RadarSDKIndoors.xcframework.zip | cut -d ' ' -f 1)" >> $GITHUB_OUTPUTInstead of:
echo "{checksum}={$(shasum -a 256 RadarSDKIndoors.xcframework.zip | cut -d ' ' -f 1)}" >> $GITHUB_OUTPUT
https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
https://github.blog/changelog/2023-07-24-github-actions-update-on-save-state-and-set-output-commands/
Github are deprecating these, so before it's broken, we should update it to use the environment files
Warnings during publish: https://github.com/radarlabs/radar-sdk-ios/actions/runs/19439889806
! monitor the next release to make sure it works.