Skip to content
This repository was archived by the owner on Jun 28, 2024. It is now read-only.

Commit 96153fe

Browse files
committed
Embed Sentry DSN during release
1 parent 31afbfc commit 96153fe

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

.github/workflows/release.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ jobs:
1414
python-version: 3.8
1515
- name: Install Poetry
1616
uses: snok/install-poetry@v1
17+
- name: Run pre-build script (embed Sentry DSN)
18+
run: |
19+
poetry run python scripts/prebuild.py
20+
env:
21+
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
1722
- name: Release
1823
uses: bjoluc/semantic-release-config-poetry@v1
1924
with:

scripts/prebuild.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import os
2+
3+
value = os.environ.get("SENTRY_DSN", "None")
4+
if value != "None":
5+
value = f'"{value}"'
6+
7+
f = open("seamapi/utils/get_sentry_dsn.py", "w")
8+
f.write(f"""
9+
def get_sentry_dsn():
10+
return {value}
11+
""")

0 commit comments

Comments
 (0)