Skip to content

Commit d83e081

Browse files
committed
fix(ci): use production environment and correct release version in sentry-release workflow
- Add environment: production so the job can access SENTRY_AUTH_TOKEN - Drop sentry/ prefix from release version to match Sentry.init() and sourcemap uploads which both use bare semver (e.g., '0.24.0')
1 parent 38818d0 commit d83e081

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

.github/workflows/sentry-release.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,14 @@ jobs:
1717
finalize:
1818
name: Finalize Sentry Release
1919
runs-on: ubuntu-latest
20+
environment: production
2021
# Skip pre-releases (nightlies, dev versions) on automatic trigger;
2122
# always run on manual dispatch.
2223
if: github.event_name == 'workflow_dispatch' || !github.event.release.prerelease
2324
env:
2425
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
2526
# Tag names are bare semver (e.g., "0.24.0", no "v" prefix),
26-
# matching both the npm package version and Sentry release version.
27+
# matching the npm package version, Sentry.init() release, and sourcemap uploads.
2728
VERSION: ${{ github.event.release.tag_name || inputs.version }}
2829
steps:
2930
- name: Setup Node.js
@@ -35,17 +36,17 @@ jobs:
3536
run: npm install -g "sentry@${VERSION}"
3637

3738
- name: Create release
38-
run: sentry release create "sentry/${VERSION}" --project cli
39+
run: sentry release create "${VERSION}" --project cli
3940

4041
- name: Set commits
4142
continue-on-error: true
42-
run: sentry release set-commits "sentry/${VERSION}" --auto
43+
run: sentry release set-commits "${VERSION}" --auto
4344

4445
- name: Finalize release
45-
run: sentry release finalize "sentry/${VERSION}"
46+
run: sentry release finalize "${VERSION}"
4647

4748
- name: Create deploy
48-
run: sentry release deploy "sentry/${VERSION}" production
49+
run: sentry release deploy "${VERSION}" production
4950

5051
- name: File issue on failure
5152
if: failure()

0 commit comments

Comments
 (0)