Add NPM CI (#25)

* update CI.

* update readme.
This commit is contained in:
Miroslav Šedivý 2023-02-26 22:02:47 +01:00 committed by GitHub
parent 3eeb589f3f
commit 40234fe3cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 92 additions and 40 deletions

View File

@ -1,31 +0,0 @@
name: Publish to npm.pkg.github.com
on:
push:
tags:
- 'v*'
jobs:
build-and-publish:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '16.x'
registry-url: 'https://npm.pkg.github.com'
- name: Install dependencies and build
run: npm install && npm run build
- name: Publish package to npm.pkg.github.com
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

91
.github/workflows/tags.yml vendored Normal file
View File

@ -0,0 +1,91 @@
name: Build and Publish package on tags
on:
push:
tags:
- 'v*'
env:
NODE_VERSION: '16.x'
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '16.x'
registry-url: 'https://npm.pkg.github.com'
- name: Install dependencies and build
run: npm ci && npm run build
- name: Prepare Artifact
run: |
mkdir artifact
cp LICENSE README.md package.json artifact
cp -r dist artifact/dist
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: package
path: artifact
publish-to-npm-pkg-github-com:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
needs: [ build ]
steps:
- name: Download Artifact
uses: actions/download-artifact@v2
with:
name: package
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: ${{ env.NODE_VERSION }}
registry-url: 'https://npm.pkg.github.com'
- name: Publish package to npm.pkg.github.com
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
publish-to-registry-npmjs-org:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
needs: [ build ]
steps:
- name: Download Artifact
uses: actions/download-artifact@v2
with:
name: package
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: ${{ env.NODE_VERSION }}
registry-url: 'https://registry.npmjs.org'
- name: Publish package to registry.npmjs.org
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}

View File

@ -4,7 +4,7 @@ Connect to [demodesk/neko](https://github.com/demodesk/neko) backend with self c
For **community edition** neko with GUI and _plug & play_ deployment visit [m1k1o/neko](https://github.com/m1k1o/neko). For **community edition** neko with GUI and _plug & play_ deployment visit [m1k1o/neko](https://github.com/m1k1o/neko).
## Installation ## Installation
Code is published to public GitHub npm repository. Code is published to public NPM registry and GitHub npm repository.
```bash ```bash
# npm command # npm command
@ -13,14 +13,6 @@ npm i @demodesk/neko
yarn add @demodesk/neko yarn add @demodesk/neko
``` ```
### Registry setup
```bash
# npm command
echo @demodesk:registry=https://npm.pkg.github.com >> .npmrc
# yarn command
echo \"@demodesk:registry\" \"https://npm.pkg.github.com\" >> .yarnrc
```
### Build ### Build
You can set keyboard provider at build time, either `novnc` or the default `guacamole`. You can set keyboard provider at build time, either `novnc` or the default `guacamole`.