From c6be13ea37e7a5c7ccbca14a90684f3234cc3093 Mon Sep 17 00:00:00 2001 From: Olivia Date: Mon, 6 May 2024 13:24:40 +0200 Subject: [PATCH 1/3] v1.1.1-dev --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7ec34f8..69def5f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@camptocamp/ogc-client", - "version": "1.1.0", + "version": "1.1.1-dev", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@camptocamp/ogc-client", - "version": "1.1.0", + "version": "1.1.1-dev", "license": "BSD-3-Clause", "dependencies": { "@rgrove/parse-xml": "^4.1.0" diff --git a/package.json b/package.json index 3398369..409f480 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@camptocamp/ogc-client", - "version": "1.1.0", + "version": "1.1.1-dev", "description": "A pure JS library for interacting with geospatial services.", "main": "./dist/dist-node.js", "browser": "./dist/index.js", From d0de4ea8019242ae54d1f0a97ad9cf01640d836a Mon Sep 17 00:00:00 2001 From: Olivia Date: Mon, 6 May 2024 13:20:58 +0200 Subject: [PATCH 2/3] add publish workflow (only runs on main) --- .github/workflows/publish.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..57865fd --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,34 @@ +name: Publish NPM package @dev version + +# This workflow runs whenever a commit is pushed on main +on: + push: + branches: + - main + +jobs: + publish-npm-package: + name: Publish NPM package + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Install Node & NPM + uses: actions/setup-node@v3 + with: + node-version: '20' + cache: 'npm' + + - name: Install dependencies + run: npm ci + + # New version will be ., e.g. 1.1.1-dev.0a4c598 + - name: Adjust package version according to branch & commit + run: npm version $(node --print 'require("./package.json").version').$(git rev-parse --short HEAD) --no-git-tag-version --allow-same-version + + - name: Publish NPM package with @dev tag + run: npm publish --tag dev + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} From 5c569b3cc17c4d57d9dbc589b05573ac5c3e56b6 Mon Sep 17 00:00:00 2001 From: Olivia Date: Mon, 6 May 2024 13:30:53 +0200 Subject: [PATCH 3/3] update README --- README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6e23d1d..8fa8d21 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# ogc-client +# ogc-client [![Latest version on NPM](https://img.shields.io/npm/v/%40camptocamp%2Fogc-client)](https://www.npmjs.com/package/@camptocamp/ogc-client) [![Latest @dev version on NPM](https://img.shields.io/npm/v/%40camptocamp%2Fogc-client/dev)](https://www.npmjs.com/package/@camptocamp/ogc-client?activeTab=versions) > A Typescript library for interacting with [OGC-compliant services](https://www.ogc.org/docs/is) @@ -48,6 +48,14 @@ enableFallbackWithoutWorker(); All processing will be done on the main thread after this call, including HTTP requests. +### Use the latest development version + +[The `@camptocamp/ogc-client` NPM package](https://www.npmjs.com/package/@camptocamp/ogc-client) is updated on every commit on the `main` branch under the `@dev` tag. To use it: + +```bash +$ npm install --save @camptocamp/ogc-client@dev +``` + ### Application A provided application containing the documentation and demo is located in the `app` folder.