From 38fd94d2419c27eb6ab3f5d552c20e1dbb251afe Mon Sep 17 00:00:00 2001 From: Ionite Date: Wed, 5 Jul 2023 19:20:05 -0400 Subject: [PATCH 1/3] Add sentry release and symbol upload to release CI --- .github/workflows/release.yml | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f37bce50..c9b844c1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -32,7 +32,16 @@ jobs: run: dotnet restore -p:PublishReadyToRun=true - name: Build - run: dotnet publish ./StabilityMatrix/StabilityMatrix.csproj -o out -c Release -r win-x64 -p:Version=$env:RELEASE_VERSION -p:FileVersion=$env:RELEASE_VERSION -p:AssemblyVersion=$env:RELEASE_VERSION -p:PublishReadyToRun=true -p:PublishSingleFile=true --self-contained true + env: + SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} + run: > + dotnet publish ./StabilityMatrix/StabilityMatrix.csproj + -o out -c Release -r win-x64 + -p:Version=$env:RELEASE_VERSION -p:FileVersion=$env:RELEASE_VERSION -p:AssemblyVersion=$env:RELEASE_VERSION + -p:PublishReadyToRun=true -p:PublishSingleFile=true + -p:SentryOrg=${{ secrets.SENTRY_ORG }} -p:SentryProject=${{ secrets.SENTRY_PROJECT }} + -p:SentryUploadSymbols=true -p:SentryUploadSources=true + --self-contained true - name: Remove old artifacts uses: c-hive/gha-remove-artifacts@v1 @@ -46,3 +55,16 @@ jobs: with: name: StabilityMatrix path: ./out/StabilityMatrix.exe + + - name: Create Sentry release + if: ${{ env.MAKE_SENTRY_RELEASE == 'true' }} + uses: getsentry/action-release@v1 + env: + MAKE_SENTRY_RELEASE: ${{ secrets.SENTRY_PROJECT != '' }} + SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} + SENTRY_ORG: ${{ secrets.SENTRY_ORG }} + SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }} + with: + environment: production + ignore_missing: true + version: StabilityMatrix@v${{ env.GIT_TAG_NAME }} From b925c396f368499021101d3cdfb33cc1ba9b93e1 Mon Sep 17 00:00:00 2001 From: Ionite Date: Wed, 5 Jul 2023 19:21:13 -0400 Subject: [PATCH 2/3] Remove jenkinsfile sentry cli step --- Jenkinsfile | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 902cf218..ba10f8fb 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -31,22 +31,6 @@ node("Windows") { bat "dotnet publish .\\StabilityMatrix\\StabilityMatrix.csproj -c Release -o out -r win-x64 -p:PublishSingleFile=true -p:Version=${version} -p:FileVersion=${version} -p:AssemblyVersion=${version} --self-contained true" } - if (env.TAG_NAME) { - stage('Sentry Release') { - bat "pip install sentry-cli" - def sentry_org = "stability-matrix" - def sentry_project = "dotnet" - def sentry_environment = "production" - def sentry_release = "StabilityMatrix@${version}" - - bat "sentry-cli releases new -p ${sentry_project} ${sentry_release}" - bat "sentry-cli releases set-commits ${sentry_release} --auto" - bat "sentry-cli releases files ${sentry_release} upload-sourcemaps ./out" - bat "sentry-cli releases finalize ${sentry_release}" - bat "sentry-cli releases deploys ${sentry_release} new -e ${sentry_environment}" - } - } - stage ('Archive Artifacts') { archiveArtifacts artifacts: 'out/*.exe', followSymlinks: false } From 6568eb21d0315b9bed482ef5b95d72612df9143c Mon Sep 17 00:00:00 2001 From: Ionite Date: Wed, 5 Jul 2023 19:21:51 -0400 Subject: [PATCH 3/3] Remove version prefix from formatting --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c9b844c1..96beef1d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -67,4 +67,4 @@ jobs: with: environment: production ignore_missing: true - version: StabilityMatrix@v${{ env.GIT_TAG_NAME }} + version: StabilityMatrix@${{ env.GIT_TAG_NAME }}