Skip to content

Commit

Permalink
only deploy to sentry when publish flag
Browse files Browse the repository at this point in the history
  • Loading branch information
imolorhe committed Jul 23, 2024
1 parent 0d2d91f commit eebebd0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
1 change: 0 additions & 1 deletion .github/workflows/pr-master-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,5 +99,4 @@ jobs:
with:
node_version: ${{ needs.vars.outputs.node_version }}
publish: false
# TODO: publish/build?: ${{!(startsWith(matrix.os, 'macos') && github.ref != 'refs/heads/master')}} # disable for macos not in master branch
secrets: inherit
14 changes: 8 additions & 6 deletions .github/workflows/reusable-publish-electron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,10 @@ jobs:
run: |
mkdir -p ~/private_keys/
echo '${{ secrets.apple_api_key }}' > ~/private_keys/AuthKey_${{ secrets.apple_api_key_id }}.p8
- name: Build/release Electron app
if: ${{ inputs.build }}
- name:
Build/release Electron app
# disable for macos not in master branch, because code signing is skipped in pull requests
if: ${{ !(startsWith(matrix.os, 'macos') && github.ref != 'refs/heads/master') && inputs.build }}
id: build-electron
uses: CryogenicPlanet/action-electron-builder@v2 # Using CryogenicPlanet until the main action adds skip_install
with:
Expand Down Expand Up @@ -142,9 +144,9 @@ jobs:
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
with:
environment: production
environment: ${{ inputs.publish && 'production' }}
sourcemaps: packages/altair-app/dist/
version: ${{ steps.getversion.outputs.version }}
version: ${{ inputs.publish && steps.getversion.outputs.version }}
url_prefix: 'altair://-'
finalize: false
- name: Upload source maps to Sentry (electron)
Expand All @@ -155,9 +157,9 @@ jobs:
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
with:
environment: production
environment: ${{ inputs.publish && 'production' }}
sourcemaps: packages/altair-electron/dist/
version: ${{ steps.getversion.outputs.version }}
version: ${{ inputs.publish && steps.getversion.outputs.version }}
url_prefix: 'app:///dist'

- name: Upload electron builds
Expand Down

0 comments on commit eebebd0

Please sign in to comment.