How to use Github Actions to generate a checksum and set env variable?

Solution 1:

Setting environment variables works differently: you append to a file whose name is stored in the $GITHUB_ENV variable, i.e., something like

run: |
  echo CHECKSUM="$(shasum foo.zip | awk '{ print $1 }')" >> "$GITHUB_ENV"