Skip to content
Merged
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
32 changes: 7 additions & 25 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ on:
branches:
- main

env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

jobs:
block-autosquash:
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.draft == false }}
Expand All @@ -25,31 +22,27 @@ jobs:
if: github.event.pull_request.draft == false
name: build
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]

steps:
- uses: actions/checkout@v4
- name: Enable Corepack
run: corepack enable

- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
node-version-file: '.nvmrc'

- uses: actions/cache@v4
id: npm-cache
with:
path: '**/node_modules'
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json', '.nvmrc') }}

- uses: actions/cache@v4
with:
path: '**/build'
key: ${{ runner.os }}-build-${{ github.sha }}

- name: Install dependencies
if: steps.npm-cache.outputs.cache-hit != 'true'
run: npm ci --ignore-scripts

- name: Build artifacts
Expand All @@ -59,35 +52,24 @@ jobs:
name: test:unit
needs: build
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]

steps:
- uses: actions/checkout@v4
- name: Enable Corepack
run: corepack enable

- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
node-version-file: '.nvmrc'

- uses: actions/cache@v4
id: npm-cache
with:
path: '**/node_modules'
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json', '.nvmrc') }}

- uses: actions/cache@v4
with:
path: '**/build'
key: ${{ runner.os }}-build-${{ github.sha }}

- name: Install
run: npm ci --ignore-scripts

- name: Build artifacts
run: npm run build

- name: Run tests
run: npm run test
21 changes: 7 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ on:
branches:
- main

concurrency: ${{ github.workflow}}-${{github.ref}}
permissions:
id-token: write # Required for OIDC
contents: read

jobs:
release:
Expand All @@ -18,32 +20,23 @@ jobs:
# This makes action fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0

- name: Enable Corepack
run: corepack enable
Comment on lines -21 to -22
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

dev: per our offline discussion with @causaly-mark this is not needed anymore


- name: Use Node.js 20.x
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: 'npm'
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
node-version-file: '.nvmrc'
registry-url: 'https://registry.npmjs.org'

- name: Install Dependencies
run: npm ci --ignore-scripts
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Build the release
run: npm run build
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Create Release Pull Request or Publish to npm
uses: changesets/action@v1
with:
version: npm run changeset version
publish: npm run release
commit: 'chore: version packages'
env:
GITHUB_TOKEN: ${{ secrets.CHANGESET_RELEASE_TOKEN }}
Copy link

Copilot AI Oct 22, 2025

Choose a reason for hiding this comment

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

The OIDC authentication requires the NODE_AUTH_TOKEN environment variable to be set for npm publishing. Add NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} to the env block, or if using provenance-based OIDC publishing without a token, ensure the changesets/action@v1 is configured to use OIDC authentication properly.

Suggested change
GITHUB_TOKEN: ${{ secrets.CHANGESET_RELEASE_TOKEN }}
GITHUB_TOKEN: ${{ secrets.CHANGESET_RELEASE_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

Copilot uses AI. Check for mistakes.
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
3 changes: 0 additions & 3 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"
Comment on lines -1 to -2
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

dev: the following screenshot explains why these lines have been removed

Image


npx --no -- commitlint --edit ${1}
Copy link

Copilot AI Oct 22, 2025

Choose a reason for hiding this comment

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

Removing the shebang line makes this script non-executable. The file needs #!/usr/bin/env sh at the top to be directly executable by Git hooks.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fuck AI ✊

2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20.13.0
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

dev: upgrade to what is soon to be the latest LTS

24