This page was generated based on Github’s Documentation. See our welcome page for context and details.
Github Event release
#
Github Action Trigger #
Webhook event payload | Activity types | GITHUB_SHA | GITHUB_REF |
---|---|---|---|
release | - published - unpublished - created - edited - deleted - prereleased - released | Last commit in the tagged release | Tag ref of release refs/tags/<tag_name> |
Note: More than one activity type triggers this event. For information about each activity type, see “Webhook events and payloads.” By default, all activity types trigger workflows that run on this event. You can limit your workflow runs to specific activity types using the types
keyword. For more information, see “Workflow syntax for GitHub Actions.”
Note: Workflows are not triggered for the created
, edited
, or deleted
activity types for draft releases. When you create your release through the GitHub browser UI, your release may automatically be saved as a draft.
Note: The prereleased
type will not trigger for pre-releases published from draft releases, but the published
type will trigger. If you want a workflow to run when stable and pre-releases publish, subscribe to published
instead of released
and prereleased
.
Runs your workflow when release activity in your repository occurs. For information about the release APIs, see “Objects” in the GraphQL API documentation or “REST API endpoints for releases and release assets” in the REST API documentation.
For example, you can run a workflow when a release has been published
.
on:
release:
types: [published]
Event Payload #
Activities: created
, deleted
, edited
, prereleased
, published
, released
, unpublished
Common Fields #
These fields are common to every event types available with this trigger.
field | type | required | description |
---|---|---|---|
github.event.enterprise | object | optional | An enterprise on GitHub. Webhook payloads contain the |
github.event.installation | object | optional | The GitHub App installation. Webhook payloads contain the |
github.event.organization | object | optional | A GitHub organization. Webhook payloads contain the |
github.event.release | object | required | The release object. |
github.event.release.assets | array of objects | required | |
github.event.release.assets.browser_download_url | string | required | |
github.event.release.assets.content_type | string | required | |
github.event.release.assets.created_at | string | required | |
github.event.release.assets.download_count | integer | required | |
github.event.release.assets.id | integer | required | |
github.event.release.assets.label | string or null | required | |
github.event.release.assets.name | string | required | The file name of the asset. |
github.event.release.assets.node_id | string | required | |
github.event.release.assets.size | integer | required | |
github.event.release.assets.state | uploaded | required | State of the release asset. |
github.event.release.assets.updated_at | string | required | |
github.event.release.assets.uploader | object or null | optional | |
github.event.release.assets.uploader.avatar_url | string | optional | |
github.event.release.assets.uploader.deleted | boolean | optional | |
github.event.release.assets.uploader.email | string or null | optional | |
github.event.release.assets.uploader.events_url | string | optional | |
github.event.release.assets.uploader.followers_url | string | optional | |
github.event.release.assets.uploader.following_url | string | optional | |
github.event.release.assets.uploader.gists_url | string | optional | |
github.event.release.assets.uploader.gravatar_id | string | optional | |
github.event.release.assets.uploader.html_url | string | optional | |
github.event.release.assets.uploader.id | integer | required | |
github.event.release.assets.uploader.login | string | required | |
github.event.release.assets.uploader.name | string | optional | |
github.event.release.assets.uploader.node_id | string | optional | |
github.event.release.assets.uploader.organizations_url | string | optional | |
github.event.release.assets.uploader.received_events_url | string | optional | |
github.event.release.assets.uploader.repos_url | string | optional | |
github.event.release.assets.uploader.site_admin | boolean | optional | |
github.event.release.assets.uploader.starred_url | string | optional | |
github.event.release.assets.uploader.subscriptions_url | string | optional | |
github.event.release.assets.uploader.type | Bot , User , Organization | optional | |
github.event.release.assets.uploader.url | string | optional | |
github.event.release.assets.url | string | required | |
github.event.release.assets_url | string | required | |
github.event.release.author | object or null | required | |
github.event.release.author.avatar_url | string | optional | |
github.event.release.author.deleted | boolean | optional | |
github.event.release.author.email | string or null | optional | |
github.event.release.author.events_url | string | optional | |
github.event.release.author.followers_url | string | optional | |
github.event.release.author.following_url | string | optional | |
github.event.release.author.gists_url | string | optional | |
github.event.release.author.gravatar_id | string | optional | |
github.event.release.author.html_url | string | optional | |
github.event.release.author.id | integer | required | |
github.event.release.author.login | string | required | |
github.event.release.author.name | string | optional | |
github.event.release.author.node_id | string | optional | |
github.event.release.author.organizations_url | string | optional | |
github.event.release.author.received_events_url | string | optional | |
github.event.release.author.repos_url | string | optional | |
github.event.release.author.site_admin | boolean | optional | |
github.event.release.author.starred_url | string | optional | |
github.event.release.author.subscriptions_url | string | optional | |
github.event.release.author.type | Bot , User , Organization | optional | |
github.event.release.author.url | string | optional | |
github.event.release.body | string or null | required | |
github.event.release.created_at | string or null | required | |
github.event.release.discussion_url | string | optional | |
github.event.release.draft | boolean | required | Whether the release is a draft or published |
github.event.release.html_url | string | required | |
github.event.release.id | integer | required | |
github.event.release.name | string or null | required | |
github.event.release.node_id | string | required | |
github.event.release.prerelease | boolean | required | Whether the release is identified as a prerelease or a full release. |
github.event.release.published_at | string or null | required | |
github.event.release.reactions | object | optional | |
github.event.release.reactions.+1 | integer | required | |
github.event.release.reactions.-1 | integer | required | |
github.event.release.reactions.confused | integer | required | |
github.event.release.reactions.eyes | integer | required | |
github.event.release.reactions.heart | integer | required | |
github.event.release.reactions.hooray | integer | required | |
github.event.release.reactions.laugh | integer | required | |
github.event.release.reactions.rocket | integer | required | |
github.event.release.reactions.total_count | integer | required | |
github.event.release.reactions.url | string | required | |
github.event.release.tag_name | string | required | The name of the tag. |
github.event.release.tarball_url | string or null | required | |
github.event.release.target_commitish | string | required | Specifies the commitish value that determines where the Git tag is created from. |
github.event.release.upload_url | string | required | |
github.event.release.url | string | required | |
github.event.release.zipball_url | string or null | required | |
github.event.repository | object | required | The repository on GitHub where the event occurred. Webhook payloads contain the |
created
#
This event occurs when there is activity relating to releases. For more information, see "About releases." For information about the APIs to manage releases, see the GraphQL API documentation or "Releases" in the REST API documentation.
To subscribe to this event, a GitHub App must have at least read-level access for the "Contents" repository permission.
field | type | required | description |
---|---|---|---|
github.event.action | created | required | |
github.event.sender | object | required | The GitHub user that triggered the event. This property is included in every webhook payload. |
deleted
#
This event occurs when there is activity relating to releases. For more information, see "About releases." For information about the APIs to manage releases, see the GraphQL API documentation or "Releases" in the REST API documentation.
To subscribe to this event, a GitHub App must have at least read-level access for the "Contents" repository permission.
field | type | required | description |
---|---|---|---|
github.event.action | deleted | required | |
github.event.sender | object | required | The GitHub user that triggered the event. This property is included in every webhook payload. |
edited
#
This event occurs when there is activity relating to releases. For more information, see "About releases." For information about the APIs to manage releases, see the GraphQL API documentation or "Releases" in the REST API documentation.
To subscribe to this event, a GitHub App must have at least read-level access for the "Contents" repository permission.
field | type | required | description |
---|---|---|---|
github.event.action | edited | required | |
github.event.changes | object | required | |
github.event.changes.body | object | optional | |
github.event.changes.body.from | string | required | The previous version of the body if the action was |
github.event.changes.name | object | optional | |
github.event.changes.name.from | string | required | The previous version of the name if the action was |
github.event.changes.make_latest | object | optional | |
github.event.changes.make_latest.to | boolean | required | Whether this release was explicitly |
github.event.sender | object | optional | The GitHub user that triggered the event. This property is included in every webhook payload. |
prereleased
#
This event occurs when there is activity relating to releases. For more information, see "About releases." For information about the APIs to manage releases, see the GraphQL API documentation or "Releases" in the REST API documentation.
To subscribe to this event, a GitHub App must have at least read-level access for the "Contents" repository permission.
field | type | required | description |
---|---|---|---|
github.event.action | prereleased | required | |
github.event.sender | object | optional | The GitHub user that triggered the event. This property is included in every webhook payload. |
published
#
This event occurs when there is activity relating to releases. For more information, see "About releases." For information about the APIs to manage releases, see the GraphQL API documentation or "Releases" in the REST API documentation.
To subscribe to this event, a GitHub App must have at least read-level access for the "Contents" repository permission.
field | type | required | description |
---|---|---|---|
github.event.action | published | required | |
github.event.sender | object | optional | The GitHub user that triggered the event. This property is included in every webhook payload. |
released
#
This event occurs when there is activity relating to releases. For more information, see "About releases." For information about the APIs to manage releases, see the GraphQL API documentation or "Releases" in the REST API documentation.
To subscribe to this event, a GitHub App must have at least read-level access for the "Contents" repository permission.
field | type | required | description |
---|---|---|---|
github.event.action | released | required | |
github.event.sender | object | optional | The GitHub user that triggered the event. This property is included in every webhook payload. |
unpublished
#
This event occurs when there is activity relating to releases. For more information, see "About releases." For information about the APIs to manage releases, see the GraphQL API documentation or "Releases" in the REST API documentation.
To subscribe to this event, a GitHub App must have at least read-level access for the "Contents" repository permission.
field | type | required | description |
---|---|---|---|
github.event.action | unpublished | required | |
github.event.sender | object | optional | The GitHub user that triggered the event. This property is included in every webhook payload. |