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
29 changes: 11 additions & 18 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,21 @@ on:
release:
types: [created]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
cache: "npm"
- run: npm install --ignore-scripts --no-audit --no-fund
- run: npm test
permissions:
id-token: write # Required for OIDC
contents: read

jobs:
publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- uses: actions/checkout@v5
- uses: actions/setup-node@v5
with:
cache: "npm"
node-version: 22
registry-url: https://registry.npmjs.org/
- run: npm install --ignore-scripts --no-fund --no-audit
- run: npm install -g npm@latest
- run: npm ci --ignore-scripts --no-fund --no-audit
- run: npm test
- run: npm run build
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- run: npm publish --access public
34 changes: 14 additions & 20 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,33 +14,30 @@ jobs:
name: Lint JS
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Lint JS
run: npx oxlint@latest -D perf

test:
name: Unit tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
- uses: actions/checkout@v5
- uses: actions/setup-node@v5
with:
cache: "npm"
- run: npm install --ignore-scripts --no-audit --no-fund
node-version: 22
- run: npm ci --ignore-scripts --no-audit --no-fund
- run: npm test

code-coverage:
name: Code coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
- uses: actions/checkout@v5
- uses: actions/setup-node@v5
with:
cache: "npm"
- run: npm install --ignore-scripts --no-audit --no-fund
node-version: 22
- run: npm ci --ignore-scripts --no-audit --no-fund
- run: npx c8 --reporter=lcov npm test
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
Expand All @@ -51,15 +48,12 @@ jobs:
name: Lint package
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
- uses: actions/checkout@v5
- uses: actions/setup-node@v5
with:
cache: "npm"
- run: npm install --ignore-scripts --no-audit --no-fund
- name: Build package
run: npm run build
node-version: 22
- run: npm ci --ignore-scripts --no-audit --no-fund
- run: npm run build
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Lint package
Expand Down
Loading