-
Notifications
You must be signed in to change notification settings - Fork 2
44 lines (39 loc) · 1.19 KB
/
sentry-release.yml
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
name: Sentry release
on:
workflow_dispatch:
inputs:
version:
description: 'The version to release to Sentry'
required: false
default: ''
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set Sentry version
id: set-version
run: |
if [ "${{ github.event.inputs.version }}" != "" ]; then
# Remove 'v' prefix if present in the input version
VERSION="${{ github.event.inputs.version }}"
VERSION="${VERSION#v}"
echo "version=$VERSION" >> $GITHUB_ENV
else
echo "version=$(echo ${{ github.ref }} | grep -oP '(?<=refs/tags/v).*')" >> $GITHUB_ENV
fi
- name: Create Sentry release
uses: getsentry/action-release@v1
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
# SENTRY_URL: https://sentry.io/
with:
environment: production
version: ${{ env.version }}