mirror of
https://github.com/System-End/hackatime-desktop.git
synced 2026-04-19 16:28:19 +00:00
feat: configure sentry releases
This commit is contained in:
parent
d03e8ae14f
commit
553ba74304
6 changed files with 52 additions and 13 deletions
4
.github/workflows/release.yaml
vendored
4
.github/workflows/release.yaml
vendored
|
|
@ -148,6 +148,8 @@ jobs:
|
|||
APPLE_PASSWORD: '${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }}'
|
||||
TAURI_SIGNING_PRIVATE_KEY: '${{ secrets.TAURI_PRIVATE_KEY }}'
|
||||
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: '${{ secrets.TAURI_KEY_PASSWORD }}'
|
||||
SENTRY_RELEASE: 'hackatime-desktop@${{ needs.release-please.outputs.tag_name }}'
|
||||
SENTRY_ENVIRONMENT: 'production'
|
||||
- name: build app
|
||||
run: >-
|
||||
pnpm run tauri build
|
||||
|
|
@ -157,6 +159,8 @@ jobs:
|
|||
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
|
||||
TAURI_SIGNING_PRIVATE_KEY: '${{ secrets.TAURI_PRIVATE_KEY }}'
|
||||
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: '${{ secrets.TAURI_KEY_PASSWORD }}'
|
||||
SENTRY_RELEASE: 'hackatime-desktop@${{ needs.release-please.outputs.tag_name }}'
|
||||
SENTRY_ENVIRONMENT: 'production'
|
||||
- name: Sign files with Trusted Signing
|
||||
if: 'startsWith(matrix.platform, ''windows'')'
|
||||
uses: azure/trusted-signing-action@v0.5.1
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
"@tailwindcss/vite": "^4.1.14",
|
||||
"@tauri-apps/cli": "^2",
|
||||
"@types/crypto-js": "^4.2.2",
|
||||
"@types/node": "^24.7.1",
|
||||
"@vitejs/plugin-vue": "^5.2.1",
|
||||
"tailwindcss": "^4.1.14",
|
||||
"typescript": "~5.9.0",
|
||||
|
|
|
|||
32
pnpm-lock.yaml
generated
32
pnpm-lock.yaml
generated
|
|
@ -44,16 +44,19 @@ importers:
|
|||
devDependencies:
|
||||
'@tailwindcss/vite':
|
||||
specifier: ^4.1.14
|
||||
version: 4.1.14(vite@6.3.6(jiti@2.6.1)(lightningcss@1.30.1))
|
||||
version: 4.1.14(vite@6.3.6(@types/node@24.7.1)(jiti@2.6.1)(lightningcss@1.30.1))
|
||||
'@tauri-apps/cli':
|
||||
specifier: ^2
|
||||
version: 2.8.4
|
||||
'@types/crypto-js':
|
||||
specifier: ^4.2.2
|
||||
version: 4.2.2
|
||||
'@types/node':
|
||||
specifier: ^24.7.1
|
||||
version: 24.7.1
|
||||
'@vitejs/plugin-vue':
|
||||
specifier: ^5.2.1
|
||||
version: 5.2.4(vite@6.3.6(jiti@2.6.1)(lightningcss@1.30.1))(vue@3.5.22(typescript@5.9.3))
|
||||
version: 5.2.4(vite@6.3.6(@types/node@24.7.1)(jiti@2.6.1)(lightningcss@1.30.1))(vue@3.5.22(typescript@5.9.3))
|
||||
tailwindcss:
|
||||
specifier: ^4.1.14
|
||||
version: 4.1.14
|
||||
|
|
@ -62,7 +65,7 @@ importers:
|
|||
version: 5.9.3
|
||||
vite:
|
||||
specifier: ^6.0.3
|
||||
version: 6.3.6(jiti@2.6.1)(lightningcss@1.30.1)
|
||||
version: 6.3.6(@types/node@24.7.1)(jiti@2.6.1)(lightningcss@1.30.1)
|
||||
vue-tsc:
|
||||
specifier: ^2.1.10
|
||||
version: 2.2.12(typescript@5.9.3)
|
||||
|
|
@ -594,6 +597,9 @@ packages:
|
|||
'@types/estree@1.0.8':
|
||||
resolution: {integrity: sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==}
|
||||
|
||||
'@types/node@24.7.1':
|
||||
resolution: {integrity: sha512-CmyhGZanP88uuC5GpWU9q+fI61j2SkhO3UGMUdfYRE6Bcy0ccyzn1Rqj9YAB/ZY4kOXmNf0ocah5GtphmLMP6Q==}
|
||||
|
||||
'@vitejs/plugin-vue@5.2.4':
|
||||
resolution: {integrity: sha512-7Yx/SXSOcQq5HiiV3orevHUFn+pmMB4cgbEkDYgnkUWb0WfeQ/wa2yFv6D5ICiCQOVpjA7vYDXrC7AGO8yjDHA==}
|
||||
engines: {node: ^18.0.0 || >=20.0.0}
|
||||
|
|
@ -871,6 +877,9 @@ packages:
|
|||
engines: {node: '>=14.17'}
|
||||
hasBin: true
|
||||
|
||||
undici-types@7.14.0:
|
||||
resolution: {integrity: sha512-QQiYxHuyZ9gQUIrmPo3IA+hUl4KYk8uSA7cHrcKd/l3p1OTpZcM0Tbp9x7FAtXdAYhlasd60ncPpgu6ihG6TOA==}
|
||||
|
||||
vite@6.3.6:
|
||||
resolution: {integrity: sha512-0msEVHJEScQbhkbVTb/4iHZdJ6SXp/AvxL2sjwYQFfBqleHtnCqv1J3sa9zbWz/6kW1m9Tfzn92vW+kZ1WV6QA==}
|
||||
engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0}
|
||||
|
|
@ -1225,12 +1234,12 @@ snapshots:
|
|||
'@tailwindcss/oxide-win32-arm64-msvc': 4.1.14
|
||||
'@tailwindcss/oxide-win32-x64-msvc': 4.1.14
|
||||
|
||||
'@tailwindcss/vite@4.1.14(vite@6.3.6(jiti@2.6.1)(lightningcss@1.30.1))':
|
||||
'@tailwindcss/vite@4.1.14(vite@6.3.6(@types/node@24.7.1)(jiti@2.6.1)(lightningcss@1.30.1))':
|
||||
dependencies:
|
||||
'@tailwindcss/node': 4.1.14
|
||||
'@tailwindcss/oxide': 4.1.14
|
||||
tailwindcss: 4.1.14
|
||||
vite: 6.3.6(jiti@2.6.1)(lightningcss@1.30.1)
|
||||
vite: 6.3.6(@types/node@24.7.1)(jiti@2.6.1)(lightningcss@1.30.1)
|
||||
|
||||
'@tauri-apps/api@2.8.0': {}
|
||||
|
||||
|
|
@ -1301,9 +1310,13 @@ snapshots:
|
|||
|
||||
'@types/estree@1.0.8': {}
|
||||
|
||||
'@vitejs/plugin-vue@5.2.4(vite@6.3.6(jiti@2.6.1)(lightningcss@1.30.1))(vue@3.5.22(typescript@5.9.3))':
|
||||
'@types/node@24.7.1':
|
||||
dependencies:
|
||||
vite: 6.3.6(jiti@2.6.1)(lightningcss@1.30.1)
|
||||
undici-types: 7.14.0
|
||||
|
||||
'@vitejs/plugin-vue@5.2.4(vite@6.3.6(@types/node@24.7.1)(jiti@2.6.1)(lightningcss@1.30.1))(vue@3.5.22(typescript@5.9.3))':
|
||||
dependencies:
|
||||
vite: 6.3.6(@types/node@24.7.1)(jiti@2.6.1)(lightningcss@1.30.1)
|
||||
vue: 3.5.22(typescript@5.9.3)
|
||||
|
||||
'@volar/language-core@2.4.15':
|
||||
|
|
@ -1601,7 +1614,9 @@ snapshots:
|
|||
|
||||
typescript@5.9.3: {}
|
||||
|
||||
vite@6.3.6(jiti@2.6.1)(lightningcss@1.30.1):
|
||||
undici-types@7.14.0: {}
|
||||
|
||||
vite@6.3.6(@types/node@24.7.1)(jiti@2.6.1)(lightningcss@1.30.1):
|
||||
dependencies:
|
||||
esbuild: 0.25.10
|
||||
fdir: 6.5.0(picomatch@4.0.3)
|
||||
|
|
@ -1610,6 +1625,7 @@ snapshots:
|
|||
rollup: 4.52.3
|
||||
tinyglobby: 0.2.15
|
||||
optionalDependencies:
|
||||
'@types/node': 24.7.1
|
||||
fsevents: 2.3.3
|
||||
jiti: 2.6.1
|
||||
lightningcss: 1.30.1
|
||||
|
|
|
|||
20
src/main.ts
20
src/main.ts
|
|
@ -15,14 +15,28 @@ app.provide('posthog', posthog)
|
|||
Sentry.init({
|
||||
app,
|
||||
dsn: "https://d67e5cceba1b80139ca09c806efc616a@o4509680631087104.ingest.us.sentry.io/4510156240060417",
|
||||
|
||||
release: __SENTRY_RELEASE__,
|
||||
environment: __SENTRY_ENVIRONMENT__,
|
||||
|
||||
sendDefaultPii: true,
|
||||
debug: __SENTRY_ENVIRONMENT__ === 'development',
|
||||
maxBreadcrumbs: 100,
|
||||
attachStacktrace: true,
|
||||
|
||||
sampleRate: 1.0,
|
||||
|
||||
integrations: [
|
||||
Sentry.browserTracingIntegration()
|
||||
Sentry.browserTracingIntegration(),
|
||||
Sentry.replayIntegration({
|
||||
maskAllText: false,
|
||||
blockAllMedia: false,
|
||||
}),
|
||||
],
|
||||
|
||||
tracesSampleRate: 1.0,
|
||||
tracesSampleRate: __SENTRY_ENVIRONMENT__ === 'production' ? 0.1 : 1.0,
|
||||
|
||||
tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/],
|
||||
profilesSampleRate: __SENTRY_ENVIRONMENT__ === 'production' ? 0.1 : 1.0,
|
||||
|
||||
enableLogs: true
|
||||
})
|
||||
|
|
|
|||
3
src/vite-env.d.ts
vendored
3
src/vite-env.d.ts
vendored
|
|
@ -1,4 +1,5 @@
|
|||
|
||||
declare const __SENTRY_RELEASE__: string;
|
||||
declare const __SENTRY_ENVIRONMENT__: string;
|
||||
|
||||
declare module '*.vue' {
|
||||
import type { DefineComponent } from 'vue'
|
||||
|
|
|
|||
|
|
@ -9,7 +9,10 @@ const host = process.env.TAURI_DEV_HOST;
|
|||
export default defineConfig(async () => ({
|
||||
plugins: [vue(), tailwindcss()],
|
||||
|
||||
|
||||
define: {
|
||||
__SENTRY_RELEASE__: JSON.stringify(process.env.SENTRY_RELEASE || 'development'),
|
||||
__SENTRY_ENVIRONMENT__: JSON.stringify(process.env.SENTRY_ENVIRONMENT || 'development'),
|
||||
},
|
||||
|
||||
|
||||
clearScreen: false,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue