KC's Workspace
    Preparing search index...

    Function setOutput

    • Sets a single output value for GitHub Actions.

      Writes the output to the GITHUB_OUTPUT file using @actions/core and returns the serialized value.

      Parameters

      • name: string

        The output name

      • value: unknown

        The output value

      Returns string

      The serialized output value

      // In a GitHub Action environment
      const version = setOutput("version", "1.0.0");
      // Writes "version=1.0.0\n" to $GITHUB_OUTPUT
      // Returns "1.0.0"