Skip to content

Commit

Permalink
Fix sentry release for dogfood instance (#1768)
Browse files Browse the repository at this point in the history
* test sentry release

* use actions checkout for dogfood release
  • Loading branch information
hubertdeng123 authored Oct 21, 2022
1 parent 6b9306a commit b71a17a
Showing 1 changed file with 19 additions and 13 deletions.
32 changes: 19 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,28 +24,34 @@ jobs:
token: ${{ secrets.GH_RELEASE_PAT }}
fetch-depth: 0
- name: Prepare release
id: prepare-release
uses: getsentry/action-prepare-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GH_RELEASE_PAT }}
with:
version: ${{ github.event.inputs.version }}
force: ${{ github.event.inputs.force }}
calver: true
- name: Create new release in self-hosted Sentry
outputs:
release-version: ${{ env.RELEASE_VERSION }}
dogfood-release:
if: github.repository_owner == 'getsentry'
runs-on: ubuntu-latest
name: Create release on self-hosted dogfood instance
needs: release
steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.GH_RELEASE_PAT }}
fetch-depth: 0
- uses: getsentry/action-release@v1
env:
SENTRY_DSN: 'https://19555c489ded4769978daae92f2346ca@self-hosted.getsentry.net/3'
SENTRY_ORG: self-hosted
SENTRY_PROJECT: installer
SENTRY_URL: https://self-hosted.getsentry.net/
SENTRY_AUTH_TOKEN: ${{ secrets.SELF_HOSTED_RELEASE_TOKEN }}
SENTRY_RELEASE: ${{ github.event.inputs.version }}
run: |
curl -sL https://sentry.io/get-cli/ | bash
# Create new Sentry release
sentry-cli --auth-token $SENTRY_AUTH_TOKEN releases new -p $SENTRY_PROJECT $SENTRY_RELEASE
sentry-cli --auth-token $SENTRY_AUTH_TOKEN releases set-commits --auto $SENTRY_RELEASE
sentry-cli --auth-token $SENTRY_AUTH_TOKEN releases finalize $SENTRY_RELEASE
# Create new deploy for this Sentry release
sentry-cli --auth-token $SENTRY_AUTH_TOKEN releases deploys $SENTRY_RELEASE new -e production
with:
environment: production
version: ${{ needs.release.outputs.release-version }}
ignore_empty: true
ignore_missing: true

0 comments on commit b71a17a

Please sign in to comment.