3

Given the GitHub Actions workflow below, how can I get the username of the person who published the release that triggered the workflow?

name: My Workflow

on:
  release:
    types: [ published ]
jobs:
  my-job:
    runs-on: [ my-runner ]

    steps:
      - name: Checkout repo
        uses: actions/checkout@v2
       
      - name: Get username of publisher
        run: |
          # HOWTO get username of publisher
jessehouwing
  • 106,458
  • 22
  • 256
  • 341
mxcd
  • 1,954
  • 2
  • 25
  • 38

1 Answers1

3

You're looking for:

${{ github.event.release.author.login }}

See:

jessehouwing
  • 106,458
  • 22
  • 256
  • 341
  • 1
    Searching for "login" in the docs reveals it :D I've previously been searching the docs for "username" – mxcd Jan 21 '22 at 08:28