Repository navigation
chore: release v1.1045.0 #622
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: New Sentry Release | |
| on: | |
| pull_request: | |
| branches: [main] | |
| types: [closed] | |
| jobs: | |
| release: | |
| # Only run for merged release PRs (title contains version like "chore: release v1.977.0") | |
| if: github.event.pull_request.merged == true && contains(github.event.pull_request.title, 'release v') | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup pnpm | |
| run: corepack enable && corepack prepare pnpm@10.30.3 --activate | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: '.nvmrc' | |
| cache: 'pnpm' | |
| - name: Cache node_modules | |
| uses: actions/cache@v4 | |
| with: | |
| path: node_modules | |
| key: ${{ runner.os }}-node-modules-${{ hashFiles('**/pnpm-lock.yaml') }} | |
| restore-keys: ${{ runner.os }}-node-modules- | |
| - name: Install Dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Extract Version | |
| id: version | |
| env: | |
| PR_TITLE: ${{ github.event.pull_request.title }} | |
| run: | | |
| # Extract version from PR title (e.g., "chore: release v1.971.0" -> "1.971.0") | |
| # Fallback to git tag for consistency with deployed version | |
| if [[ "$PR_TITLE" =~ v([0-9]+\.[0-9]+\.[0-9]+) ]]; then | |
| VERSION="${BASH_REMATCH[1]}" | |
| else | |
| # Use git tag to match deployed version | |
| TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "") | |
| if [[ "$TAG" =~ ^v([0-9]+\.[0-9]+\.[0-9]+)$ ]]; then | |
| VERSION="${BASH_REMATCH[1]}" | |
| else | |
| VERSION="${{ github.event.pull_request.merge_commit_sha }}" | |
| VERSION="${VERSION:0:7}" | |
| fi | |
| fi | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| - name: Build Web | |
| run: MODE=production DEPLOY=true VITE_VERSION=${{ steps.version.outputs.version }} pnpm run build:web | |
| - name: Sentry Release | |
| uses: getsentry/action-release@v3 | |
| env: | |
| SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
| SENTRY_ORG: ${{ secrets.SENTRY_ORG }} | |
| SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }} | |
| with: | |
| environment: production | |
| # Must match SDK format: shapeshift-web@{version} | |
| version: shapeshift-web@${{ steps.version.outputs.version }} | |
| sourcemaps: ./build | |
| ignore_missing: true |