These answers work, however if you're using Powershell, this is how you can do it:
Powershell
echo "someKey=someValue" >> $env:GITHUB_OUTPUT