Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GitHub Actions: user that published a release

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
like image 801
mxcd Avatar asked Aug 26 '26 00:08

mxcd


1 Answers

You're looking for:

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

See:

  • https://stackoverflow.com/a/70744585
  • https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#release
  • https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#release
like image 151
jessehouwing Avatar answered Aug 28 '26 12:08

jessehouwing



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!