getsentry / action-release

GitHub Action for creating a release on Sentry
Apache License 2.0
446 stars 53 forks source link

Sourcemaps fail: Rewriting sources error: got 8 segments, expected 4 or 5 #190

Closed jbergstroem closed 7 months ago

jbergstroem commented 7 months ago

Github Sentry Action Release Bug Report

The action fails to upload sourcemaps (but exits successfully - perhaps expose --strict?) in the rewrite step.

Environment

Using github runners on ubuntu-latest with the v1 tag

Steps to Reproduce

name: Create Sentry Release
on:
  push:
    branches:
      - main

  create_sentry_release:
    runs-on: ubuntu-22.04
    steps:
      - name: Checkout
        uses: actions/checkout@v4
        with:
          fetch-depth: 0

      - uses: oven-sh/setup-bun@v1

      - name: Install dependencies
        run: bun install

      - name: Generate sourcemap
        run: bun run build

      - name: Create Sentry Release and upload sourcemap
        uses: getsentry/action-release@v1
        env:
          SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
          SENTRY_ORG: ${{ vars.SENTRY_ORG }}
          SENTRY_PROJECT: ${{ vars.SENTRY_PROJECT }}
        with:
          environment: production
          sourcemaps: ./dist

Actual Result

The rewrite step should work.

jbergstroem commented 7 months ago

Thinking this bug rather belongs to the sentry-cli repo. It seems to be related to parsing sourcemaps from bun.