mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2026-09-13 05:11:56 +02:00
Dummy workflow to get macOS npm dependencies
This commit is contained in:
@@ -0,0 +1,72 @@
|
||||
name: Generate macOS package lock
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
paths:
|
||||
- '.github/workflows/generate-macos-package-lock.yml'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
generate:
|
||||
name: Regenerate package-lock.json on macOS
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- name: Check out sources
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 24
|
||||
|
||||
- name: Show tool versions
|
||||
run: |
|
||||
node --version
|
||||
npm --version
|
||||
|
||||
- name: Regenerate lockfile for macOS
|
||||
run: npm install --package-lock-only --include=optional --ignore-scripts --no-audit --no-fund
|
||||
|
||||
- name: Verify macOS dependency records
|
||||
run: |
|
||||
node <<'NODE'
|
||||
const { packages } = require('./package-lock.json')
|
||||
const requiredPackages = [
|
||||
'node_modules/bindings',
|
||||
'node_modules/file-uri-to-path',
|
||||
'node_modules/fsevents',
|
||||
'node_modules/nan',
|
||||
'node_modules/watchpack-chokidar2/node_modules/fsevents'
|
||||
]
|
||||
const missingPackages = requiredPackages.filter((name) => !packages[name])
|
||||
|
||||
if (missingPackages.length) {
|
||||
console.error(`Missing lockfile records: ${missingPackages.join(', ')}`)
|
||||
process.exit(1)
|
||||
}
|
||||
|
||||
console.log('All required macOS dependency records are present.')
|
||||
NODE
|
||||
|
||||
if ! git diff --quiet -- package.json; then
|
||||
echo 'package.json was modified unexpectedly.' >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if git diff --quiet -- package-lock.json; then
|
||||
echo 'package-lock.json was not changed.' >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
git diff --stat -- package-lock.json
|
||||
|
||||
- name: Upload regenerated lockfile
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: package-lock-macos-node-24
|
||||
path: package-lock.json
|
||||
if-no-files-found: error
|
||||
retention-days: 7
|
||||
Reference in New Issue
Block a user