Release browser RUM and session replay #333
Workflow file for this run
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: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: {} | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| env: | |
| CI: true | |
| steps: | |
| - name: Begin CI... | |
| uses: actions/checkout@v4 | |
| - name: Setup Vite+ | |
| uses: voidzero-dev/setup-vp@v1 | |
| with: | |
| node-version: '24' | |
| cache: true | |
| - name: Install dependencies | |
| run: vp install --frozen-lockfile | |
| - name: Build | |
| run: vp run --filter "./packages/*" build | |
| - name: Static checks | |
| run: vp check | |
| - name: TypeScript comparison | |
| run: vp run --filter "./packages/*" typecheck | |
| - name: Test | |
| run: vp run --filter "./packages/*" test | |
| - name: Test release tooling | |
| run: pnpm run test:release-tooling | |
| release: | |
| needs: [build] | |
| runs-on: ubuntu-latest | |
| if: success() && github.ref == 'refs/heads/main' | |
| permissions: | |
| id-token: write | |
| contents: write | |
| pull-requests: write | |
| environment: | |
| name: npm | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Vite+ | |
| uses: voidzero-dev/setup-vp@v1 | |
| with: | |
| node-version: '24' | |
| cache: true | |
| - name: Install dependencies | |
| run: vp install --frozen-lockfile | |
| - name: Install pnpm for publishing | |
| uses: pnpm/action-setup@v4 | |
| - name: Release | |
| id: changesets | |
| uses: changesets/action@v1 | |
| with: | |
| publish: pnpm run release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| - name: Create GitHub releases | |
| if: steps.changesets.outputs.published == 'true' | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| for row in $(echo '${{ steps.changesets.outputs.publishedPackages }}' | jq -c '.[]'); do | |
| NAME=$(echo "$row" | jq -r '.name') | |
| VERSION=$(echo "$row" | jq -r '.version') | |
| TAG="${NAME}@${VERSION}" | |
| if ! git ls-remote --tags origin "refs/tags/${TAG}" | grep -q .; then | |
| git tag "$TAG" | |
| git push origin "$TAG" | |
| fi | |
| if ! gh release view "$TAG" > /dev/null 2>&1; then | |
| gh release create "$TAG" --title "$TAG" --generate-notes | |
| fi | |
| done |