Skip to content

Commit

Permalink
Merge pull request #43 from Juanmalopezg/publish-to-npm-registry
Browse files Browse the repository at this point in the history
Publish release packages to npm registry
  • Loading branch information
englishm authored Jan 30, 2025
2 parents fd29d95 + 200beab commit 9c33051
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 7 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: publish package
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
- run: cp README.md lib/README.md
- working-directory: lib
run: |
npm ci
npm run build
npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ This library offers **two main approaches** to playing MoQ streams in a browser:
Install the library from npm:

```bash
npm install moq-player
npm install @moq-js/player
```

Or include via a `<script>` tag (for the IIFE build):

```html
<script src="https://cdn.jsdelivr.net/npm/package@latest/dist/moq-player.iife.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@moq-js/player@latest/dist/moq-player.iife.js"></script>
```

## Usage
Expand Down
9 changes: 7 additions & 2 deletions lib/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
{
"name": "moq-player",
"version": "0.0.1",
"name": "@moq-js/player",
"version": "0.2.0",
"description": "Media over QUIC library",
"license": "(MIT OR Apache-2.0)",
"wc-player": "video-moq/index.ts",
"simple-player": "playback/index.ts",
"files": ["dist"],
"exports": {
".": {
"import": "./dist/moq-player.esm.js",
Expand Down Expand Up @@ -69,5 +70,9 @@
"last 1 firefox version",
"last 1 safari version"
]
},
"repository": {
"type": "git",
"url": "https://github.com/~englishm/moq-js"
}
}
9 changes: 7 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "moq-js",
"type": "module",
"private": true,
"workspaces": [
"lib",
"web",
Expand Down

0 comments on commit 9c33051

Please sign in to comment.