1
1
mirror of https://github.com/theoludwig/eslint-config-conventions.git synced 2024-11-08 19:11:31 +01:00

feat: add npm package provenance

Ref: https://github.blog/2023-04-19-introducing-npm-package-provenance/
This commit is contained in:
Divlo 2023-05-13 15:41:12 +02:00
parent ca9b1db4bd
commit b1bd574d42
No known key found for this signature in database
GPG Key ID: 8F9478F220CE65E9
6 changed files with 24 additions and 11 deletions

View File

@ -12,14 +12,14 @@ jobs:
steps: steps:
- uses: 'actions/checkout@v3.5.2' - uses: 'actions/checkout@v3.5.2'
- name: 'Use Node.js' - name: 'Setup Node.js'
uses: 'actions/setup-node@v3.6.0' uses: 'actions/setup-node@v3.6.0'
with: with:
node-version: 'lts/*' node-version: 'lts/*'
cache: 'npm' cache: 'npm'
- name: 'Install' - name: 'Install dependencies'
run: 'npm install' run: 'npm clean-install'
- run: 'npm run lint:commit -- --to "${{ github.sha }}"' - run: 'npm run lint:commit -- --to "${{ github.sha }}"'
- run: 'npm run lint:editorconfig' - run: 'npm run lint:editorconfig'

View File

@ -7,20 +7,28 @@ on:
jobs: jobs:
release: release:
runs-on: 'ubuntu-latest' runs-on: 'ubuntu-latest'
permissions:
contents: 'write'
issues: 'write'
pull-requests: 'write'
id-token: 'write'
steps: steps:
- uses: 'actions/checkout@v3.5.2' - uses: 'actions/checkout@v3.5.2'
with: with:
fetch-depth: 0 fetch-depth: 0
persist-credentials: false persist-credentials: false
- name: 'Use Node.js' - name: 'Setup Node.js'
uses: 'actions/setup-node@v3.6.0' uses: 'actions/setup-node@v3.6.0'
with: with:
node-version: 'lts/*' node-version: 'lts/*'
cache: 'npm' cache: 'npm'
- name: 'Install' - name: 'Install dependencies'
run: 'npm install' run: 'npm clean-install'
- name: 'Verify the integrity of provenance attestations and registry signatures for installed dependencies'
run: 'npm audit signatures'
- name: 'Release' - name: 'Release'
run: 'npm run release' run: 'npm run release'

View File

@ -12,14 +12,14 @@ jobs:
steps: steps:
- uses: 'actions/checkout@v3.5.2' - uses: 'actions/checkout@v3.5.2'
- name: 'Use Node.js' - name: 'Setup Node.js'
uses: 'actions/setup-node@v3.6.0' uses: 'actions/setup-node@v3.6.0'
with: with:
node-version: 'lts/*' node-version: 'lts/*'
cache: 'npm' cache: 'npm'
- name: 'Install' - name: 'Install dependencies'
run: 'npm install' run: 'npm clean-install'
- name: 'Test' - name: 'Test'
run: 'npm run test' run: 'npm run test'

1
.npmrc
View File

@ -1 +1,2 @@
save-exact=true save-exact=true
provenance=true

2
package-lock.json generated
View File

@ -34,7 +34,7 @@
}, },
"engines": { "engines": {
"node": ">=16.0.0", "node": ">=16.0.0",
"npm": ">=8.0.0" "npm": ">=9.0.0"
}, },
"peerDependencies": { "peerDependencies": {
"eslint": "^8.33.0", "eslint": "^8.33.0",

View File

@ -27,9 +27,13 @@
"index.js", "index.js",
".eslintrc.json" ".eslintrc.json"
], ],
"publishConfig": {
"access": "public",
"provenance": true
},
"engines": { "engines": {
"node": ">=16.0.0", "node": ">=16.0.0",
"npm": ">=8.0.0" "npm": ">=9.0.0"
}, },
"scripts": { "scripts": {
"lint:commit": "commitlint", "lint:commit": "commitlint",