Skip to content

Kepler.gl is a powerful open source geospatial analysis tool for large-scale data sets.

[Chore] Github action to publish npm package (#825)

Giuseppe Macrì3c2a8c0c632d
diff --git a/.github/workflows/npmpublish.yml b/.github/workflows/npmpublish.yml
new file mode 100644
index 000000000..4edd755f0
--- /dev/null
+++ b/.github/workflows/npmpublish.yml
@@ -0,0 +1,45 @@
+name: Node.js Package
+
+on:
+ release:
+ types: [created]
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v1
+ - uses: actions/setup-node@v1
+ with:
+ node-version: 8
+ - run: npm install
+ - run: npm test
+
+ publish-npm:
+ needs: build
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v1
+ - uses: actions/setup-node@v1
+ with:
+ node-version: 8
+ registry-url: https://registry.npmjs.org/
+ - run: npm install
+ - run: npm publish
+ env:
+ NODE_AUTH_TOKEN: ${{secrets.npm_token}}
+
+ publish-gpr:
+ needs: build
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v1
+ - uses: actions/setup-node@v1
+ with:
+ node-version: 8
+ registry-url: https://npm.pkg.github.com/
+ scope: '@macrigiuseppe'
+ - run: npm install
+ - run: npm publish
+ env:
+ NODE_AUTH_TOKEN: ${{secrets.github}}