'Github Actions steps id, how to call stdout of it? [duplicate]

So I have issue because I want to store value of my branch prefix as id but I stumbled across... how to call it in other step? I have something like this, so far I tried steps.branch-prefix.output.stdout and steps,branch-prefix.output.branch-prefix (first one was my instict because... what I do there returns all in stdout...)

Workflow sample:

name: PR Semver
on: [push]

jobs:
  update-version:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Get current prefix
        id: branch-prefix
        run: echo $GITHUB_REF | sed -E 's/^refs\/heads\/(.*)\/.*/\1/'
      - name: Check if branch prefix is valid (major, minor, patch)
        run: |
          echo "Checking branch prefix..."
          echo "branch prefix: ${{ steps.branch-prefix.output.stdout }}"
          if [[ ${{ steps.branch-prefix.output.stdout }} != "major" && ${{ steps.branch-prefix.output.stdout }} != "minor" && ${{ steps.branch-prefix.output.stdout }} != "patch" ]]; then
            echo "Branch prefix is not valid, exiting..."
            exit 1
          fi


Sources

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

Source: Stack Overflow

Solution Source