diff --git a/.github/actions/publish/action.yml b/.github/actions/publish/action.yml index 268856df..f63dec95 100644 --- a/.github/actions/publish/action.yml +++ b/.github/actions/publish/action.yml @@ -180,6 +180,15 @@ runs: -name "latest*.yml" \ -exec yq -i e .stagingPercentage=\"$percentage\" {} \; + - name: Upload sourcemap to Sentry + shell: bash --noprofile --norc -eo pipefail -x {0} + run: | + VERSION=${{ steps.package_release.outputs.version }} npm run uploadSourcemap + env: + SENTRY_AUTH_TOKEN: ${{ fromJSON(inputs.secrets).SENTRY_AUTH_TOKEN }} + SENTRY_ORG: balenaEtcher + SENTRY_PROJECT: balenaetcher + - name: Upload artifacts uses: actions/upload-artifact@v3 with: diff --git a/package-lock.json b/package-lock.json index 03b2c82b..aa9cbd74 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3232,6 +3232,30 @@ } } }, + "@sentry/cli": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/@sentry/cli/-/cli-2.11.0.tgz", + "integrity": "sha512-qfCf/R0VhmlWcdfu2rntejqbIgovx7FQTwFreQpbISlB/JS9xHF8KEEJXZTdDFoPCi2H9KHg4CPUsCNAKbAdMA==", + "dev": true, + "requires": { + "https-proxy-agent": "^5.0.0", + "node-fetch": "^2.6.7", + "progress": "^2.0.3", + "proxy-from-env": "^1.1.0", + "which": "^2.0.2" + }, + "dependencies": { + "node-fetch": { + "version": "2.6.7", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", + "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "dev": true, + "requires": { + "whatwg-url": "^5.0.0" + } + } + } + }, "@sentry/core": { "version": "7.16.0", "resolved": "https://registry.npmjs.org/@sentry/core/-/core-7.16.0.tgz", @@ -4631,6 +4655,15 @@ "integrity": "sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw==", "dev": true }, + "agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "dev": true, + "requires": { + "debug": "4" + } + }, "agentkeepalive": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.2.1.tgz", @@ -10180,6 +10213,16 @@ "resolve-alpn": "^1.0.0" } }, + "https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "dev": true, + "requires": { + "agent-base": "6", + "debug": "4" + } + }, "human-signals": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz", diff --git a/package.json b/package.json index 2d3cbaca..e8e0464f 100644 --- a/package.json +++ b/package.json @@ -32,6 +32,7 @@ "test-windows": "npm run lint && npm run test-gui && npm run test-shared && npm run test-spectron && npm run sanity-checks", "test": "echo npm run test-{linux,windows,macos}", "watch": "webpack serve --no-optimization-minimize --config ./webpack.dev.config.ts", + "uploadSourcemap": "sentry-cli sentry-cli releases files $VERSION upload-sourcemaps ./generated/*.js.map --finalize", "webpack": "webpack" }, "husky": { @@ -53,6 +54,7 @@ "@balena/lint": "5.4.2", "@balena/sudo-prompt": "9.2.1-workaround-windows-amperstand-in-username-0849e215b947987a643fe5763902aea201255534", "@fortawesome/fontawesome-free": "5.15.4", + "@sentry/cli": "^2.11.0", "@sentry/electron": "^4.1.2", "@svgr/webpack": "5.5.0", "@types/chai": "4.3.4",