From 94112fdf7b853f8bd97e8fb3f4cf23961d9f0938 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0ediv=C3=BD?= Date: Sun, 17 Jul 2022 22:43:29 +0200 Subject: [PATCH] Add github actions (#1) --- .github/workflows/publish.yml | 31 +++++++++++++++++++++++++++++ .github/workflows/pull_requests.yml | 25 +++++++++++++++++++++++ package.json | 9 +++------ 3 files changed, 59 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/publish.yml create mode 100644 .github/workflows/pull_requests.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 00000000..45795059 --- /dev/null +++ b/.github/workflows/publish.yml @@ -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 }} diff --git a/.github/workflows/pull_requests.yml b/.github/workflows/pull_requests.yml new file mode 100644 index 00000000..f8176c57 --- /dev/null +++ b/.github/workflows/pull_requests.yml @@ -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 diff --git a/package.json b/package.json index ff8196b2..5e33d2bf 100644 --- a/package.json +++ b/package.json @@ -2,12 +2,9 @@ "name": "@demodesk/neko", "version": "1.6.4", "description": "Client as reusable Vue.js component for neko streaming server.", - "repository": { - "type": "git", - "url": "https://gitlab.com/demodesk/neko/client.git" - }, - "bugs": { - "url": "https://gitlab.com/demodesk/neko/client/-/issues" + "repository": "https://github.com/demodesk/neko-client", + "publishConfig": { + "registry":"https://npm.pkg.github.com" }, "main": "dist/neko.umd.js", "module": "dist/neko.common.js",