A GitHub action that creates releases for Sentry.io.
A GitHub action that makes is easy to create a release in Sentry.io based on events in GitHub. Examples:
- a GitHub release is published
- a commit is pushed to master
- a pull request is merged to master
First thing first, let's make sure you have the necessary pre-requisites.
Create a workflow .yml
file in your repo's .github/workflows
directory. An example workflow is available below. For more information, reference the GitHub Help Documentation for Creating a workflow file.
Required The name of release in Sentry.
Required The name of the environment the release was deployed to.
For more information on these inputs, see the API Documentation
Required Sentry auth token.
Required Sentry organization.
Required Sentry project name.
Optional URL to the Sentry instance, useful for e.g. on-prem deployments.
name: Create a Sentry.io release
uses: tclindner/[email protected]
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: myAwesomeOrg
SENTRY_PROJECT: myAwesomeProject
with:
tagName: ${{ github.ref }}
environment: qa
Note:
sentry-releases-action
will automatically trimrefs/tags/
fromtagName
. This means you can passGITHUB_REF
directly from release events without the need of mutating it first.
On every GitHub release
event.
name: ReleaseWorkflow
on:
release:
types: [published, prereleased]
jobs:
createSentryRelease:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@master
- name: Create a Sentry.io release
uses: tclindner/[email protected]
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: myAwesomeOrg
SENTRY_PROJECT: myAwesomeProject
with:
tagName: ${{ github.ref }}
environment: qa
Note: This action only works on Linux x86_64 systems.
Please see CONTRIBUTING.md.
Please see CHANGELOG.md.
Copyright (c) 2019-2020 Thomas Lindner. Licensed under the MIT license.