Add github actions (#1)

This commit is contained in:
Miroslav Šedivý 2022-07-17 22:43:29 +02:00 committed by GitHub
parent 78b0ee6b3c
commit 94112fdf7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 59 additions and 6 deletions

31
.github/workflows/publish.yml vendored Normal file
View File

@ -0,0 +1,31 @@
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://registry.npmjs.org'
- 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 }}

25
.github/workflows/pull_requests.yml vendored Normal file
View File

@ -0,0 +1,25 @@
name: Build npm package
on:
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies and build
run: npm install && npm run build

View File

@ -2,12 +2,9 @@
"name": "@demodesk/neko", "name": "@demodesk/neko",
"version": "1.6.4", "version": "1.6.4",
"description": "Client as reusable Vue.js component for neko streaming server.", "description": "Client as reusable Vue.js component for neko streaming server.",
"repository": { "repository": "https://github.com/demodesk/neko-client",
"type": "git", "publishConfig": {
"url": "https://gitlab.com/demodesk/neko/client.git" "registry":"https://npm.pkg.github.com"
},
"bugs": {
"url": "https://gitlab.com/demodesk/neko/client/-/issues"
}, },
"main": "dist/neko.umd.js", "main": "dist/neko.umd.js",
"module": "dist/neko.common.js", "module": "dist/neko.common.js",