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",