ci: improve workflow configuration and reliability

- Replace global read-all permissions with scoped permissions (contents: read, actions: write)
- Fix cache configuration to exclude node_modules and include package-lock.json
- Improve CI workflow resolution with flexible path matching and pagination
- Verify version instead of committing version bumps from CI
- Detect prereleases and publish with appropriate npm tags (next vs latest)
- Use generic test suite description in release notes to avoid drift
This commit is contained in:
2025-12-11 19:28:48 +02:00
parent 5bc95f0bcd
commit 4cc202c687
2 changed files with 43 additions and 41 deletions

View File

@@ -12,7 +12,9 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions: read-all
permissions:
contents: read
actions: write
jobs:
test:
@@ -89,9 +91,8 @@ jobs:
id: cache-parser
with:
path: |
src/
node_modules/
key: ${{ runner.os }}-parser-${{ matrix.node-version }}-${{ hashFiles('src/parser.c', 'binding.gyp', 'package.json') }}
build/
key: ${{ runner.os }}-parser-${{ matrix.node-version }}-${{ hashFiles('package-lock.json', 'src/parser.c', 'binding.gyp', 'src/**/*.cc', 'src/**/*.h') }}
- name: Build Parser
if: steps.cache-parser.outputs.cache-hit != 'true'