From 2c567c0a6cd63a60ba438d90c02e4a8f215f1a59 Mon Sep 17 00:00:00 2001 From: Andreas Stassivik Date: Wed, 18 Sep 2024 02:46:44 -0700 Subject: [PATCH 1/4] superfluous quotes removed --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3b5609e..6978b37 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,7 +23,7 @@ jobs: - name: Node.js setup ${{ matrix.node-version }} uses: actions/setup-node@v4 with: - cache: 'npm' + cache: npm cache-dependency-path: package-lock.json node-version: ${{ matrix.node-version }} From f32965c9f11179b398a2fcfa955b5ae9d7625e22 Mon Sep 17 00:00:00 2001 From: Andreas Stassivik Date: Wed, 18 Sep 2024 02:47:47 -0700 Subject: [PATCH 2/4] `prepublishOnly` tests before publishing to npm --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 0e7da20..67c45f5 100644 --- a/package.json +++ b/package.json @@ -32,6 +32,7 @@ "preimport:leaflet:fullscreen": "shx mkdir -p public/leaflet/fullscreen", "import:leaflet:fullscreen": "shx cp -r node_modules/leaflet-fullscreen/dist/* public/leaflet/fullscreen", "lint": "eslint .", + "prepublishOnly": "npm test", "serve": "serve", "serve:test": "serve -p 3001", "prestart": "npm run build", From 3f12bc1441d1721f904497d620ad944e42902582 Mon Sep 17 00:00:00 2001 From: Andreas Stassivik Date: Wed, 18 Sep 2024 02:49:06 -0700 Subject: [PATCH 3/4] npm publish GitHub Action implementation --- .github/workflows/npm-publish.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/npm-publish.yml diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml new file mode 100644 index 0000000..84bac17 --- /dev/null +++ b/.github/workflows/npm-publish.yml @@ -0,0 +1,29 @@ +name: npm publish + +on: + pull_request: + types: [ closed ] + +jobs: + publish-npm: + if: github.event.pull_request.merged + runs-on: ubuntu-latest + + steps: + - name: Repository checkout + uses: actions/checkout@v4 + + - name: Node.js setup + uses: actions/setup-node@v4 + with: + cache: npm + cache-dependency-path: package-lock.json + node-version: 20.17.x + + - name: Dependencies installation + run: npm ci + + - env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + name: Publish to npm + run: npm publish From 09f5a9675846155fd4fb515e1439813d66d6e4dc Mon Sep 17 00:00:00 2001 From: Andreas Stassivik Date: Wed, 18 Sep 2024 03:09:54 -0700 Subject: [PATCH 4/4] 0.0.20 --- 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 3afe58b..c81e942 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@stassi/leaf", - "version": "0.0.19", + "version": "0.0.20", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@stassi/leaf", - "version": "0.0.19", + "version": "0.0.20", "cpu": [ "arm64", "x64" diff --git a/package.json b/package.json index 67c45f5..4dd72d1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@stassi/leaf", - "version": "0.0.19", + "version": "0.0.20", "private": true, "description": "Leaflet adapter.", "keywords": [