-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yaml
36 lines (33 loc) · 1.28 KB
/
action.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Sentry Release
description: Create a new Sentry release and upload sourcemaps
inputs:
package-name:
description: 'The name of the package to release'
required: true
release-name:
description: 'The name of the release to create'
required: true
sourcemap-flags:
description: 'Flags to pass to sentry-cli'
required: false
default: '--ext .js --ext .mjs --ext .map '
working-directory:
description: 'The working directory to run sentry-cli in'
required: false
default: '.'
runs:
using: "composite"
steps:
- name: Derive appropriate SHAs for base and head for `nx affected` commands
id: setSHAs
uses: nrwl/nx-set-shas@v3
- name: "Run"
shell: bash
env:
SENTRY_RELEASE: ${{ inputs.release-name }}
working-directory: ${{ inputs.working-directory }}
run: |
echo "${GITHUB_REPOSITORY}@${{ steps.setSHAs.outputs.base }}..${{ steps.setSHAs.outputs.head }}"
sentry-cli releases new "${SENTRY_RELEASE}"
sentry-cli releases set-commits "${SENTRY_RELEASE}" --commit "${GITHUB_REPOSITORY}@${{ steps.setSHAs.outputs.base }}..${{ steps.setSHAs.outputs.head }}"
sentry-cli releases files "${SENTRY_RELEASE}" upload-sourcemaps ${{ inputs.sourcemap-flags }} --validate sourcemaps --wait .