Conversation
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.