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
51 changes: 38 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ jobs:
matrix:
node: [20, 22, 24]
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7

- uses: actions/setup-node@v4
- uses: actions/setup-node@v7
with:
node-version: ${{ matrix.node }}
cache: npm
Expand All @@ -47,9 +47,9 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7

- uses: actions/setup-node@v4
- uses: actions/setup-node@v7
with:
node-version: 22
cache: npm
Expand All @@ -64,9 +64,9 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7

- uses: actions/setup-node@v4
- uses: actions/setup-node@v7
with:
node-version: 22
cache: npm
Expand All @@ -85,9 +85,9 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7

- uses: actions/setup-node@v4
- uses: actions/setup-node@v7
with:
node-version: 22
cache: npm
Expand All @@ -103,9 +103,9 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7

- uses: actions/setup-node@v4
- uses: actions/setup-node@v7
with:
node-version: 22
cache: npm
Expand Down Expand Up @@ -138,20 +138,45 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7

- uses: actions/setup-node@v4
- uses: actions/setup-node@v7
with:
node-version: 22
cache: npm

- run: npm audit --omit=dev --audit-level=high

release:
# The release workflow (npm-publish.yml) only runs when a release is published, so a change to the actions or to npm it relies on
# would only show up then. This runs its setup (registry-url without a token, the latest npm, the version taken from a tag, the build
# of prepublishOnly) up to the point of publishing, which is a dry run: no credentials, nothing is sent.
name: Release dry run
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v7

- uses: actions/setup-node@v7
with:
node-version: '22'
registry-url: 'https://registry.npmjs.org/'
package-manager-cache: false

- run: npm install -g npm@latest

- name: Set the package version, as the release does from the tag
run: npm version 3.0.0-ci.0 --no-git-tag-version

- run: npm ci --no-audit --no-fund

- run: npm publish --dry-run --tag ci

ci:
# The one check to require in the branch protection rules: the names of the matrix jobs above can change.
name: CI
if: ${{ always() }}
needs: [test, coverage, build, types, php, audit]
needs: [test, coverage, build, types, php, audit, release]
runs-on: ubuntu-latest
steps:
- name: Every job succeeded
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v7

- name: Set up Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v7
with:
node-version: '22'
registry-url: 'https://registry.npmjs.org/'
# a job that can publish does not restore a cache that other runs could have written to
package-manager-cache: false

- name: Upgrade NPM to latest
run: npm install -g npm@latest
Expand Down Expand Up @@ -65,7 +67,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout main
uses: actions/checkout@v4
uses: actions/checkout@v7
with:
ref: main

Expand Down
Loading