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
7 changes: 7 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["config:best-practices"],
"pre-commit": {
"enabled": true
}
}
49 changes: 49 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Release
"on":
push:
branches:
- main
- next
- beta
- "*.x"

permissions:
contents: read # for checkout
id-token: write # to enable use of OIDC for npm provenance

jobs:
release:
name: release
runs-on: ubuntu-latest
steps:
- uses: actions/create-github-app-token@v2
id: app_token
with:
app-id: ${{ vars.SEMANTIC_RELEASE_GITHUB_COMMIT_APP_KEY }}
private-key: ${{ secrets.SEMANTIC_RELEASE_GITHUB_COMMIT_PRIVATE_KEY }}
permission-contents: write # to be able to publish a GitHub release
permission-issues: write # to be able to comment on released issues
permission-pull-requests: write # to be able to comment on released pull requests

- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false

- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
cache: npm
node-version: lts/*

- run: npm clean-install

- name: Build plugin
run: npm run build

- run: npm install --global corepack@latest

- run: corepack npm audit signatures

- run: npx semantic-release
env:
GITHUB_TOKEN: ${{ steps.app_token.outputs.token }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
73 changes: 73 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Test
"on":
push:
branches:
- main
- renovate/**
pull_request:
types:
- opened
- synchronize

env:
FORCE_COLOR: 1
NPM_CONFIG_COLOR: always

jobs:
# verify against ranges defined as supported in engines.node
test_matrix:
strategy:
matrix:
node-version:
- 22.14.0
- 24.10.0
- 24
os:
- ubuntu-latest
runs-on: "${{ matrix.os }}"
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: "Use Node.js ${{ matrix.node-version }}"
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version: "${{ matrix.node-version }}"
cache: npm
- run: npm clean-install
- run: npm install --global corepack@latest
- run: corepack npm audit signatures
- run: npm test

# verify against the node version defined for development in the .nvmrc
test_dev:
runs-on: ubuntu-latest
timeout-minutes: 5

steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- run: git config --global user.name github-actions
- run: git config --global user.email github-actions@github.com
- name: Use Node.js from .nvmrc
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version-file: .nvmrc
cache: npm
- run: npm clean-install
- run: npm install --global corepack@latest
- run: corepack npm audit signatures
- run: npm test

# separate job to set as required in branch protection,
# as the build names above change each time Node versions change
test:
runs-on: ubuntu-latest
needs:
- test_dev
- test_matrix
if: always()
steps:
- name: All matrix versions passed
if: ${{ !(contains(needs.*.result, 'failure')) }}
run: exit 0
- name: Some matrix version failed
if: ${{ contains(needs.*.result, 'failure') }}
run: exit 1
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
node_modules/
dist/
coverage/
.DS_Store
*.log
.env
9 changes: 9 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
src/
*.test.ts
*.test.js
tsconfig.json
jest.config.js
.gitignore
coverage/
.DS_Store
*.log
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
22
Loading