-
Notifications
You must be signed in to change notification settings - Fork 123
48 lines (47 loc) · 1.63 KB
/
sentry.yml
File metadata and controls
48 lines (47 loc) · 1.63 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
name: Sentry
on:
push:
branches-ignore:
- "translations_**"
- "dependabot/**"
tags:
- 'v*'
jobs:
sentry:
name: Sentry
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
fetch-tags: true
- name: Set up JDK
uses: actions/setup-java@v5
with:
java-version: 25
distribution: 'corretto'
cache: gradle
- name: Get version from Gradle
id: get_version
run: echo "RELEASE_VERSION=$(./gradlew version -q --console plain --warning-mode none 2>/dev/null | tail -1)" >> $GITHUB_ENV
- name: Get Sentry environment from project version
id: get_env
run: |
if [[ "${{ env.RELEASE_VERSION }}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "ENVIRONMENT=production" >> $GITHUB_ENV
elif [[ "${{ env.RELEASE_VERSION }}" =~ ^[0-9]+\.[0-9]+\.[0-9]+-r[ca]\.[0-9]+$ ]]; then
echo "ENVIRONMENT=pre-release" >> $GITHUB_ENV
elif [[ "${{ env.RELEASE_VERSION }}" == *-SNAPSHOT && ! "${{ env.RELEASE_VERSION }}" == *-DIRTY ]]; then
echo "ENVIRONMENT=develop" >> $GITHUB_ENV
else
echo "ENVIRONMENT=feature" >> $GITHUB_ENV
fi
- name: Create Sentry release
uses: getsentry/action-release@v3
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
with:
environment: ${{ env.ENVIRONMENT }}
release: bsl-language-server@${{ env.RELEASE_VERSION }}