add emulatorjs to npm (#775)

Create NPM release #755
This commit is contained in:
Allan Niles 2024-02-12 20:58:10 -07:00 committed by GitHub
parent 507fdcd51d
commit 2cce5430ae
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 27 additions and 10 deletions

19
.github/workflows/npm.yml vendored Normal file
View File

@ -0,0 +1,19 @@
name: Publish Package to npmjs
on:
release:
types: [published]
workflow_dispatch:
jobs:
build:
if: github.repository == 'EmulatorJS/EmulatorJS'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

3
.gitignore vendored
View File

@ -7,4 +7,5 @@ roms/
data/emulator.min.js
data/emulator.min.css
data/cores
.DS_Store
.DS_Store
.vscode/*

View File

@ -1,7 +0,0 @@
{
"livePreview.httpHeaders": {
"Cross-Origin-Opener-Policy": "same-origin",
"Cross-Origin-Embedder-Policy": "require-corp",
"Accept-Ranges": "bytes"
}
}

View File

@ -1,8 +1,12 @@
{
"name": "EmulatorJS",
"name": "@emulatorjs/emulatorjs",
"version": "4.0.11",
"repository": "https://github.com/EmulatorJS/EmulatorJS.git",
"repository": {
"type": "git",
"url": "https://github.com/EmulatorJS/EmulatorJS.git"
},
"license": "GPL-3.0",
"description": "EmulatorJS is a frontend for RetroArch in the web browser.",
"scripts": {
"start": "http-server"
},