forked from getsentry/self-hosted
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (49 loc) · 1.95 KB
/
release.yml
File metadata and controls
51 lines (49 loc) · 1.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Release
on:
workflow_dispatch:
inputs:
version:
description: Version to release (optional)
required: false
force:
description: Force a release even when there are release-blockers (optional)
required: false
schedule:
# We want the release to be at 10 or 11am Pacific Time
# We also make this an hour after all others such as Sentry,
# Snuba, and Relay to make sure their releases finish.
- cron: "0 18 15 * *"
jobs:
release:
if: github.repository_owner == 'getsentry'
runs-on: ubuntu-latest
name: "Release a new version"
steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.GH_RELEASE_PAT }}
fetch-depth: 0
- name: 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
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