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
4 changes: 2 additions & 2 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ inputs:
node_version:
description: The Node.js version.
required: false
default: '16'
default: '22'
registry_url:
description: The Node.js package registry URL.
required: false
Expand All @@ -16,7 +16,7 @@ runs:
using: composite
steps:
- name: Setup Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v5
with:
cache: npm
node-version: ${{ inputs.node_version }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ on:

jobs:
fix:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v5
with:
ref: ${{ github.head_ref }}
token: ${{ secrets.GH_TOKEN }}
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v4
uses: crazy-max/ghaction-import-gpg@v7
with:
git_user_signingkey: true
git_commit_gpgsign: true
Expand All @@ -34,7 +34,7 @@ jobs:
- name: Format
run: npm run format
- name: Commit
uses: stefanzweifel/git-auto-commit-action@v4
uses: stefanzweifel/git-auto-commit-action@v7
with:
commit_message: Run format
commit_user_name: ${{ secrets.GIT_USER_NAME }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,23 @@ on:

jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v5
- name: Setup
uses: ./.github/actions/setup
- name: Build
run: npm run build
env:
POSTHOG_API_KEY: ${{ secrets.POSTHOG_API_KEY }}
lint:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v5
- name: Setup
uses: ./.github/actions/setup
- name: Lint
Expand Down
86 changes: 58 additions & 28 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,51 +8,81 @@ on:

jobs:
npm:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup
uses: ./.github/actions/setup
uses: actions/checkout@v5
- name: Setup Node.js
uses: actions/setup-node@v5
with:
node_version: '14'
- name: Publish
uses: JS-DevTools/npm-publish@v1
with:
access: public
token: ${{ secrets.NPM_TOKEN }}
node-version: '22'
registry-url: https://registry.npmjs.org
- name: Check version
id: version
shell: bash
run: |
name="$(jq -r '.name' package.json)"
current="$(jq -r '.version' package.json)"
published="$(npm view "${name}@${current}" version 2>/dev/null || true)"
{
echo "name=${name}"
echo "current=${current}"
echo "published=${published}"
} >> "$GITHUB_OUTPUT"
- name: Publish ${{ steps.version.outputs.name }}@${{ steps.version.outputs.current }}
if: ${{ steps.version.outputs.published != steps.version.outputs.current }}
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
github:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup
uses: ./.github/actions/setup
- name: Publish
uses: JS-DevTools/npm-publish@v1
uses: actions/checkout@v5
- name: Setup Node.js
uses: actions/setup-node@v5
with:
access: public
token: ${{ secrets.GITHUB_TOKEN }}
registry: https://npm.pkg.github.com
node-version: '22'
registry-url: https://npm.pkg.github.com
scope: '@${{ github.repository_owner }}'
- name: Check version
id: version
shell: bash
run: |
name="$(jq -r '.name' package.json)"
current="$(jq -r '.version' package.json)"
published="$(npm view "${name}@${current}" version 2>/dev/null || true)"
{
echo "name=${name}"
echo "current=${current}"
echo "published=${published}"
} >> "$GITHUB_OUTPUT"
env:
NODE_AUTH_TOKEN: ${{ secrets.GH_TOKEN }}
- name: Publish ${{ steps.version.outputs.name }}@${{ steps.version.outputs.current }}
if: ${{ steps.version.outputs.published != steps.version.outputs.current }}
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.GH_TOKEN }}
docs:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v5
with:
ref: ${{ github.head_ref }}
token: ${{ secrets.GH_TOKEN }}
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v3
uses: crazy-max/ghaction-import-gpg@v7
id: import_gpg
with:
git-user-signingkey: true
git-commit-gpgsign: true
git-committer-name: ${{ secrets.GIT_USER_NAME }}
git-committer-email: ${{ secrets.GIT_USER_EMAIL }}
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
git_user_signingkey: true
git_commit_gpgsign: true
git_committer_name: ${{ secrets.GIT_USER_NAME }}
git_committer_email: ${{ secrets.GIT_USER_EMAIL }}
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
- name: Setup
uses: ./.github/actions/setup
Expand All @@ -61,7 +91,7 @@ jobs:
env:
POSTHOG_API_KEY: ${{ secrets.POSTHOG_API_KEY }}
- name: Publish
uses: peaceiris/actions-gh-pages@v3
uses: peaceiris/actions-gh-pages@v4
with:
personal_token: ${{ secrets.GH_TOKEN }}
publish_dir: build
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ on:

jobs:
release:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v5
with:
persist-credentials: false
- name: Setup Git config
Expand All @@ -31,7 +31,7 @@ jobs:
git config user.name "$GIT_USER_NAME"
git config user.email "$GIT_USER_EMAIL"
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v4
uses: crazy-max/ghaction-import-gpg@v7
with:
git_user_signingkey: true
git_commit_gpgsign: true
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
lts/gallium
22
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,18 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/)
and this project adheres to [Semantic Versioning](https://semver.org/).

## Unreleased

### Changed

- Modernized GitHub Actions workflows so current runners can schedule them:
`ubuntu-20.04` runners to `ubuntu-latest`, `actions/checkout` v2 to v5,
`actions/setup-node` v2 to v5, `crazy-max/ghaction-import-gpg` v3/v4 to v7,
`stefanzweifel/git-auto-commit-action` v4 to v7, and
`peaceiris/actions-gh-pages` v3 to v4.
- Replaced the deprecated `JS-DevTools/npm-publish` action with a plain
`npm publish` step guarded by a published-version check.
- Fixed the kebab-case GPG inputs in the gh-pages job (e.g. `gpg-private-key`),
which `ghaction-import-gpg` silently ignores; they are now snake_case so the
signing key actually imports.
- Bumped the Node floor to 22 (`engines.node`, `.nvmrc`, and the setup action
default); validated that the Docusaurus build still succeeds on Node 22.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@
"postformat": "prettier --write --ignore-path .gitignore 'docs/**/*.(md)'"
},
"engines": {
"node": ">=14.15.0",
"npm": ">= 8.1.0"
"node": ">=22.0.0"
},
"overrides": {
"@docusaurus/core": {
Expand Down