Skip to content

Commit

Permalink
Merge pull request #11 from medooze/lester/pack_and_publish
Browse files Browse the repository at this point in the history
Switch to npm pack and publish via github action
  • Loading branch information
Bryan-Lester-Dolby authored May 29, 2024
2 parents 2116b8a + 83e7dba commit 57c0655
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 2 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Publish
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'

jobs:
publish-npmjs:
permissions:
packages: write
contents: read
uses: millicast/github-actions/.github/workflows/npm-publish.yml@main
with:
registry-url: 'https://registry.npmjs.org/'
secrets:
token: ${{ secrets.NPMJS_PUBLISH_TOKEN }}
17 changes: 15 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"swig": "swig -javascript -node -c++ src/audio-codecs.i",
"build": "node-gyp build --jobs=max",
"install": "test -f build/Release/medooze-audio-codecs.node || (node-gyp configure && node-gyp rebuild --jobs=max)",
"package": "npm run prepare && tar cvzf build/medooze-audio-codecs.tgz `([ \"$(uname)\" = 'Darwin' ] && echo \"-s |^|medooze-audio-codecs/|\") || echo \" --transform=flags=r;s|^|medooze-audio-codecs/|\"` media-server/src/* media-server/include/* media-server/ext/libdatachannels/src/* media-server/ext/crc32c/* lib/* package.json index.js index.d.ts build/types binding.gyp README.md src",
"dist": "npm run configure && npm run build && npm run prepare && mkdir -p dist && tar cvzf dist/medooze-audio-codecs-`node -e 'console.log(require(\"./package.json\").version)'`.tgz `([ \"$(uname)\" = 'Darwin' ] && echo \"-s |^|medooze-audio-codecs/|\") || echo \" --transform=flags=r;s|^|medooze-audio-codecs/|\"` package.json index.js index.d.ts build/types README.md lib/* build/Release/medooze-audio-codecs.node",
"test": "tap tests/*.js --cov --no-check-coverage"
},
Expand All @@ -35,5 +34,19 @@
"@types/node": "^20.8.6",
"@types/uuid": "^9.0.5",
"typescript": "^5.2.2"
}
},
"files": [
"media-server/src/*",
"media-server/include/*",
"media-server/ext/libdatachannels/src/*",
"media-server/ext/crc32c/*",
"lib/*",
"package.json",
"index.js",
"index.d.ts",
"build/types",
"binding.gyp",
"README.md",
"src"
]
}

0 comments on commit 57c0655

Please sign in to comment.