Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,35 +10,48 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6

- uses: actions/setup-node@v6
with:
node-version: 25
check-latest: true

- name: Install dependencies
run: npm i

- name: Biome
run: node --run biome:ci

- name: Typecheck
run: node --run typecheck

- name: ESLint
run: node --run eslint

- name: Prettier
run: node --run prettier:check

- name: Bundle
run: node --run build

- name: Build website
run: node --run build:website

- name: Install Playwright Browsers
run: npx playwright install chromium firefox

- name: Test
run: node --run test
timeout-minutes: 4

- name: Visual regression test
run: node --run visual

- name: Upload coverage
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}

- name: Deploy gh-pages
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
run: |
Expand Down
77 changes: 77 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: Publish

on:
workflow_dispatch:
inputs:
version:
description: 'Version to publish (e.g., 0.1.1, 0.2.0, 1.0.0)'
required: true
type: string

jobs:
publish:
name: Publish
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write

steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0

- uses: actions/setup-node@v6
with:
node-version: 25
check-latest: true
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
run: npm i

- name: Biome
run: node --run biome:ci

- name: Typecheck
run: node --run typecheck

- name: ESLint
run: node --run eslint

- name: Prettier
run: node --run prettier:check

- name: Bundle
run: node --run build

- name: Build website
run: node --run build:website

- name: Install Playwright Browsers
run: npx playwright install chromium firefox

- name: Test
run: node --run test
timeout-minutes: 4

- name: Visual regression test
run: node --run visual

- name: Update version
run: |
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com"
npm version ${{ inputs.version }}

# https://docs.npmjs.com/trusted-publishers
- name: Publish to npm
run: npm publish

- name: Push commit and tag
run: git push origin main --follow-tags
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will have to double-check our branch rules, we need to allow directly pushing to main.


- name: Create GitHub Release
run: gh release create v${{ inputs.version }} --title "v${{ inputs.version }}" --generate-notes
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll create immutable releases now, we'll have to write changelogs manually.
We can improve this in the future to automatically add changelogs from files, but this will do for now.

Image

env:
GH_TOKEN: ${{ github.token }}
23 changes: 0 additions & 23 deletions CONTRIBUTING.md

This file was deleted.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"type": "git",
"url": "git+https://github.com/Comcast/react-data-grid.git"
},
"homepage": "https://github.com/Comcast/react-data-grid#readme",
"bugs": "https://github.com/Comcast/react-data-grid/issues",
"type": "module",
"exports": {
Expand Down