'GitHub Action Set $GITHUB_ENV Not Saving

Per the documentation found here, I have tried setting a GitHub Action environment variable but noticed that the env variables don't seem to save. Has this been deprecated or is the documentation / my implementation just incorrect?

- name: Get Gradle VersionName
  working-directory : ${{ github.workspace }}/app
  run : |
    echo "Get Gradle VersionName"
    echo "action_state=yellow" >> $GITHUB_ENV
    echo "${{ env.action_state }}"
    grep 'versionName' build.gradle | awk '{print $2}'

enter image description here



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source