diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml deleted file mode 100644 index 2eae80e8..00000000 --- a/.github/workflows/publish.yml +++ /dev/null @@ -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 }} diff --git a/.github/workflows/tags.yml b/.github/workflows/tags.yml new file mode 100644 index 00000000..c1c03c84 --- /dev/null +++ b/.github/workflows/tags.yml @@ -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 }} diff --git a/README.md b/README.md index ec637346..609070e6 100644 --- a/README.md +++ b/README.md @@ -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). ## Installation -Code is published to public GitHub npm repository. +Code is published to public NPM registry and GitHub npm repository. ```bash # npm command @@ -13,14 +13,6 @@ npm i @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 You can set keyboard provider at build time, either `novnc` or the default `guacamole`.