From 3e4d68d40a38fffdc8ca89847a81e8df086f61d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rokas=20Bar=C5=A1auskas?= Date: Wed, 13 Dec 2023 14:05:24 +0200 Subject: [PATCH 01/14] Add npm publish --- .github/workflows/npm_publish.yml | 22 ++++++++++++++++++++++ .github/workflows/release.yml | 6 ++---- 2 files changed, 24 insertions(+), 4 deletions(-) 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..dfbf2ae --- /dev/null +++ b/.github/workflows/npm_publish.yml @@ -0,0 +1,22 @@ +name: npm_publish +on: + release: + types: [published] + +jobs: + publish: + needs: build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v3 + with: + node-version: 18 + - run: npm init --scope=nosto -y + + - uses: JS-DevTools/npm-publish@v1 + with: + token: ${{ secrets.NPMJS_TOKEN }} + access: "public" + dry-run: false + check-version: true diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9922a65..4833aa1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,7 +8,7 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-node@v3 with: @@ -16,9 +16,7 @@ jobs: cache: 'npm' - run: npm ci - - run: npm run build - - run: npm run test # release: @@ -46,4 +44,4 @@ jobs: # with: # extra_plugins: | # @semantic-release/changelog - # @semantic-release/git \ No newline at end of file + # @semantic-release/git From d8f863b8e7966c276ca3bd1ed9e8e56607398e8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rokas=20Bar=C5=A1auskas?= Date: Wed, 13 Dec 2023 16:00:43 +0200 Subject: [PATCH 02/14] remove dependency from publish worfklow --- .github/workflows/npm_publish.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/npm_publish.yml b/.github/workflows/npm_publish.yml index dfbf2ae..48b45e2 100644 --- a/.github/workflows/npm_publish.yml +++ b/.github/workflows/npm_publish.yml @@ -5,7 +5,6 @@ on: jobs: publish: - needs: build runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -13,6 +12,9 @@ jobs: with: node-version: 18 - run: npm init --scope=nosto -y + - run: npm install + - run: npm run build + - run: npm run test - uses: JS-DevTools/npm-publish@v1 with: From 57884e4f73b851d0013f0f6258bb99fe7200f80f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rokas=20Bar=C5=A1auskas?= Date: Wed, 13 Dec 2023 18:21:01 +0200 Subject: [PATCH 03/14] feat: test --- .github/workflows/release.yml | 67 +++++++++++++++++++++-------------- 1 file changed, 40 insertions(+), 27 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4833aa1..cefe3a9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,40 +8,53 @@ jobs: build: runs-on: ubuntu-latest steps: + - name: Checkout current branch - uses: actions/checkout@v4 + - name: Setup NodeJS - uses: actions/setup-node@v3 with: node-version: 18 cache: 'npm' - - run: npm ci + - name: Install dependencies + - run: npm install + + - name: Build project - run: npm run build + + - name: Test project - run: npm run test - # release: - # needs: build - # runs-on: ubuntu-latest - # if: github.ref == 'refs/heads/main' - # environment: - # name: production - # steps: - # - uses: actions/checkout@v3 - - # - uses: actions/setup-node@v3 - # with: - # node-version: 18 - # cache: 'npm' - - # - run: npm ci - - # - run: npm run build - - # - uses: cycjimmy/semantic-release-action@v3 - # env: - # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - # with: - # extra_plugins: | - # @semantic-release/changelog - # @semantic-release/git + release: + needs: build + runs-on: ubuntu-latest + if: github.ref == 'refs/heads/release-action' + environment: + name: production + steps: + - name: Checkout current branch + - uses: actions/checkout@v4 + + - name: Setup NodeJS + - uses: actions/setup-node@v3 + with: + node-version: 18 + cache: 'npm' + + - name: Install dependencies + - run: npm install + + - name: Publish project + - uses: cycjimmy/semantic-release-action@v4 + id: semantic + with: + extra_plugins: | + @semantic-release/changelog + @semantic-release/git + branches: | + [ + "release-action" + ] + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 49af58056d97e3ca8bdd6feed7cf90c596aabb22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rokas=20Bar=C5=A1auskas?= Date: Wed, 13 Dec 2023 18:23:29 +0200 Subject: [PATCH 04/14] feat: fix --- .github/workflows/release.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cefe3a9..f1629c0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,29 +2,29 @@ name: Release on: push: - branches: ['**'] + branches: ["**"] jobs: build: runs-on: ubuntu-latest steps: - name: Checkout current branch - - uses: actions/checkout@v4 + uses: actions/checkout@v4 - name: Setup NodeJS - - uses: actions/setup-node@v3 + uses: actions/setup-node@v3 with: node-version: 18 - cache: 'npm' + cache: "npm" - name: Install dependencies - - run: npm install + run: npm install - name: Build project - - run: npm run build + run: npm run build - name: Test project - - run: npm run test + run: npm run test release: needs: build @@ -34,19 +34,19 @@ jobs: name: production steps: - name: Checkout current branch - - uses: actions/checkout@v4 + uses: actions/checkout@v4 - name: Setup NodeJS - - uses: actions/setup-node@v3 + uses: actions/setup-node@v3 with: node-version: 18 - cache: 'npm' + cache: "npm" - name: Install dependencies - - run: npm install + run: npm install - name: Publish project - - uses: cycjimmy/semantic-release-action@v4 + uses: cycjimmy/semantic-release-action@v4 id: semantic with: extra_plugins: | From 3b3bca62016ffebe0317423f7a5c06bddf665fbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rokas=20Bar=C5=A1auskas?= Date: Wed, 13 Dec 2023 18:24:34 +0200 Subject: [PATCH 05/14] feat: fix branches --- .github/workflows/release.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f1629c0..ad0fb9a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -52,9 +52,9 @@ jobs: extra_plugins: | @semantic-release/changelog @semantic-release/git - branches: | - [ - "release-action" - ] + branches: | + [ + "release-action" + ] env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From b2a9d9eb64bcf579c6336034eb96f84e84dcce78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rokas=20Bar=C5=A1auskas?= Date: Wed, 13 Dec 2023 18:46:19 +0200 Subject: [PATCH 06/14] feat: try release npm with semantic-release --- .github/workflows/npm_publish.yml | 44 +++++++++++++++---------------- .github/workflows/release.yml | 1 + 2 files changed, 23 insertions(+), 22 deletions(-) diff --git a/.github/workflows/npm_publish.yml b/.github/workflows/npm_publish.yml index 48b45e2..7afb4ae 100644 --- a/.github/workflows/npm_publish.yml +++ b/.github/workflows/npm_publish.yml @@ -1,24 +1,24 @@ -name: npm_publish -on: - release: - types: [published] +# name: npm_publish +# on: +# release: +# types: [published] -jobs: - publish: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v3 - with: - node-version: 18 - - run: npm init --scope=nosto -y - - run: npm install - - run: npm run build - - run: npm run test +# jobs: +# publish: +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v4 +# - uses: actions/setup-node@v3 +# with: +# node-version: 18 +# - run: npm init --scope=nosto -y +# - run: npm install +# - run: npm run build +# - run: npm run test - - uses: JS-DevTools/npm-publish@v1 - with: - token: ${{ secrets.NPMJS_TOKEN }} - access: "public" - dry-run: false - check-version: true +# - uses: JS-DevTools/npm-publish@v1 +# with: +# token: ${{ secrets.NPMJS_TOKEN }} +# access: "public" +# dry-run: false +# check-version: true diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ad0fb9a..b51656e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -58,3 +58,4 @@ jobs: ] env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPMJS_TOKEN }} From 1ab9b81050393673506fca16f26d8f1ca88ae165 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Wed, 13 Dec 2023 16:49:47 +0000 Subject: [PATCH 07/14] chore(release): 1.0.0 [skip ci] # 1.0.0 (2023-12-13) ### Features * add tests for history element ([9c4a19b](https://github.com/Nosto/nosto-autocomplete/commit/9c4a19be162e43837ef368fee404764abcb031ad)) * fix ([49af580](https://github.com/Nosto/nosto-autocomplete/commit/49af58056d97e3ca8bdd6feed7cf90c596aabb22)) * fix branches ([3b3bca6](https://github.com/Nosto/nosto-autocomplete/commit/3b3bca62016ffebe0317423f7a5c06bddf665fbf)) * test ([57884e4](https://github.com/Nosto/nosto-autocomplete/commit/57884e4f73b851d0013f0f6258bb99fe7200f80f)) * try release npm with semantic-release ([b2a9d9e](https://github.com/Nosto/nosto-autocomplete/commit/b2a9d9eb64bcf579c6336034eb96f84e84dcce78)) --- CHANGELOG.md | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..97a121a --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,10 @@ +# 1.0.0 (2023-12-13) + + +### Features + +* add tests for history element ([9c4a19b](https://github.com/Nosto/nosto-autocomplete/commit/9c4a19be162e43837ef368fee404764abcb031ad)) +* fix ([49af580](https://github.com/Nosto/nosto-autocomplete/commit/49af58056d97e3ca8bdd6feed7cf90c596aabb22)) +* fix branches ([3b3bca6](https://github.com/Nosto/nosto-autocomplete/commit/3b3bca62016ffebe0317423f7a5c06bddf665fbf)) +* test ([57884e4](https://github.com/Nosto/nosto-autocomplete/commit/57884e4f73b851d0013f0f6258bb99fe7200f80f)) +* try release npm with semantic-release ([b2a9d9e](https://github.com/Nosto/nosto-autocomplete/commit/b2a9d9eb64bcf579c6336034eb96f84e84dcce78)) From 125fc7c7be59ce19065ec1128d662945fb802428 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rokas=20Bar=C5=A1auskas?= Date: Wed, 13 Dec 2023 19:11:06 +0200 Subject: [PATCH 08/14] feat: release --- src/mustache.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mustache.ts b/src/mustache.ts index 73568b9..5b21d73 100644 --- a/src/mustache.ts +++ b/src/mustache.ts @@ -17,6 +17,7 @@ export function fromMustacheTemplate(template: string) { ) } + return (container: HTMLElement, state: object) => { container.innerHTML = Mustache.render(template, { ...state, From e6b6efc15c74fc99c482a49b1c3bb1c3bcf22397 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Wed, 13 Dec 2023 17:14:21 +0000 Subject: [PATCH 09/14] chore(release): 1.0.0 [skip ci] # 1.0.0 (2023-12-13) ### Features * add tests for history element ([9c4a19b](https://github.com/Nosto/nosto-autocomplete/commit/9c4a19be162e43837ef368fee404764abcb031ad)) * fix ([49af580](https://github.com/Nosto/nosto-autocomplete/commit/49af58056d97e3ca8bdd6feed7cf90c596aabb22)) * fix branches ([3b3bca6](https://github.com/Nosto/nosto-autocomplete/commit/3b3bca62016ffebe0317423f7a5c06bddf665fbf)) * release ([125fc7c](https://github.com/Nosto/nosto-autocomplete/commit/125fc7c7be59ce19065ec1128d662945fb802428)) * test ([57884e4](https://github.com/Nosto/nosto-autocomplete/commit/57884e4f73b851d0013f0f6258bb99fe7200f80f)) * try release npm with semantic-release ([b2a9d9e](https://github.com/Nosto/nosto-autocomplete/commit/b2a9d9eb64bcf579c6336034eb96f84e84dcce78)) --- CHANGELOG.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 97a121a..3fcff7d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,18 @@ # 1.0.0 (2023-12-13) +### Features + +* add tests for history element ([9c4a19b](https://github.com/Nosto/nosto-autocomplete/commit/9c4a19be162e43837ef368fee404764abcb031ad)) +* fix ([49af580](https://github.com/Nosto/nosto-autocomplete/commit/49af58056d97e3ca8bdd6feed7cf90c596aabb22)) +* fix branches ([3b3bca6](https://github.com/Nosto/nosto-autocomplete/commit/3b3bca62016ffebe0317423f7a5c06bddf665fbf)) +* release ([125fc7c](https://github.com/Nosto/nosto-autocomplete/commit/125fc7c7be59ce19065ec1128d662945fb802428)) +* test ([57884e4](https://github.com/Nosto/nosto-autocomplete/commit/57884e4f73b851d0013f0f6258bb99fe7200f80f)) +* try release npm with semantic-release ([b2a9d9e](https://github.com/Nosto/nosto-autocomplete/commit/b2a9d9eb64bcf579c6336034eb96f84e84dcce78)) + +# 1.0.0 (2023-12-13) + + ### Features * add tests for history element ([9c4a19b](https://github.com/Nosto/nosto-autocomplete/commit/9c4a19be162e43837ef368fee404764abcb031ad)) From 72564306b773c7d89e3642167619b025465fb423 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rokas=20Bar=C5=A1auskas?= Date: Wed, 13 Dec 2023 19:19:46 +0200 Subject: [PATCH 10/14] feat: publish config fix --- package.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/package.json b/package.json index de74a60..0dafdb0 100644 --- a/package.json +++ b/package.json @@ -182,5 +182,9 @@ } } } + }, + "publishConfig": { + "access": "public", + "registry": "https://registry.npmjs.org/" } } From e01ad7a260de9a3e3f8c2bc001e49200497ecc21 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Wed, 13 Dec 2023 17:24:04 +0000 Subject: [PATCH 11/14] chore(release): 1.0.0 [skip ci] # 1.0.0 (2023-12-13) ### Features * add tests for history element ([9c4a19b](https://github.com/Nosto/nosto-autocomplete/commit/9c4a19be162e43837ef368fee404764abcb031ad)) * fix ([49af580](https://github.com/Nosto/nosto-autocomplete/commit/49af58056d97e3ca8bdd6feed7cf90c596aabb22)) * fix branches ([3b3bca6](https://github.com/Nosto/nosto-autocomplete/commit/3b3bca62016ffebe0317423f7a5c06bddf665fbf)) * publish config fix ([7256430](https://github.com/Nosto/nosto-autocomplete/commit/72564306b773c7d89e3642167619b025465fb423)) * release ([125fc7c](https://github.com/Nosto/nosto-autocomplete/commit/125fc7c7be59ce19065ec1128d662945fb802428)) * test ([57884e4](https://github.com/Nosto/nosto-autocomplete/commit/57884e4f73b851d0013f0f6258bb99fe7200f80f)) * try release npm with semantic-release ([b2a9d9e](https://github.com/Nosto/nosto-autocomplete/commit/b2a9d9eb64bcf579c6336034eb96f84e84dcce78)) --- CHANGELOG.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3fcff7d..559b0fe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,19 @@ # 1.0.0 (2023-12-13) +### Features + +* add tests for history element ([9c4a19b](https://github.com/Nosto/nosto-autocomplete/commit/9c4a19be162e43837ef368fee404764abcb031ad)) +* fix ([49af580](https://github.com/Nosto/nosto-autocomplete/commit/49af58056d97e3ca8bdd6feed7cf90c596aabb22)) +* fix branches ([3b3bca6](https://github.com/Nosto/nosto-autocomplete/commit/3b3bca62016ffebe0317423f7a5c06bddf665fbf)) +* publish config fix ([7256430](https://github.com/Nosto/nosto-autocomplete/commit/72564306b773c7d89e3642167619b025465fb423)) +* release ([125fc7c](https://github.com/Nosto/nosto-autocomplete/commit/125fc7c7be59ce19065ec1128d662945fb802428)) +* test ([57884e4](https://github.com/Nosto/nosto-autocomplete/commit/57884e4f73b851d0013f0f6258bb99fe7200f80f)) +* try release npm with semantic-release ([b2a9d9e](https://github.com/Nosto/nosto-autocomplete/commit/b2a9d9eb64bcf579c6336034eb96f84e84dcce78)) + +# 1.0.0 (2023-12-13) + + ### Features * add tests for history element ([9c4a19b](https://github.com/Nosto/nosto-autocomplete/commit/9c4a19be162e43837ef368fee404764abcb031ad)) From 57637ca8b5c1b40f1212019c2b70c17f4df067ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rokas=20Bar=C5=A1auskas?= Date: Thu, 14 Dec 2023 11:43:05 +0200 Subject: [PATCH 12/14] fix: release --- src/mustache.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/mustache.ts b/src/mustache.ts index 5b21d73..73568b9 100644 --- a/src/mustache.ts +++ b/src/mustache.ts @@ -17,7 +17,6 @@ export function fromMustacheTemplate(template: string) { ) } - return (container: HTMLElement, state: object) => { container.innerHTML = Mustache.render(template, { ...state, From fc4fe71d380f5f59721f3d49439dcd504ec0ab43 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Thu, 14 Dec 2023 09:46:20 +0000 Subject: [PATCH 13/14] chore(release): 1.0.1 [skip ci] ## [1.0.1](https://github.com/Nosto/nosto-autocomplete/compare/v1.0.0...v1.0.1) (2023-12-14) ### Bug Fixes * release ([57637ca](https://github.com/Nosto/nosto-autocomplete/commit/57637ca8b5c1b40f1212019c2b70c17f4df067ae)) --- CHANGELOG.md | 7 +++++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 559b0fe..3cc6f09 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [1.0.1](https://github.com/Nosto/nosto-autocomplete/compare/v1.0.0...v1.0.1) (2023-12-14) + + +### Bug Fixes + +* release ([57637ca](https://github.com/Nosto/nosto-autocomplete/commit/57637ca8b5c1b40f1212019c2b70c17f4df067ae)) + # 1.0.0 (2023-12-13) diff --git a/package-lock.json b/package-lock.json index a9d14e1..3b040a9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@nosto/nosto-autocomplete", - "version": "1.0.0", + "version": "1.0.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@nosto/nosto-autocomplete", - "version": "1.0.0", + "version": "1.0.1", "license": "BSD-3-Clause", "devDependencies": { "@graphql-codegen/cli": "5.0.0", diff --git a/package.json b/package.json index 0dafdb0..d58963a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@nosto/nosto-autocomplete", - "version": "1.0.0", + "version": "1.0.1", "description": "Library designed to simplify the implementation of search autocomplete functionality", "keywords": [ "nosto" From 90613e583b75feb91817170e83159595a5bef1d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rokas=20Bar=C5=A1auskas?= Date: Thu, 14 Dec 2023 14:02:56 +0200 Subject: [PATCH 14/14] Change release branch to main --- .github/workflows/npm_publish.yml | 24 ------------------------ .github/workflows/release.yml | 4 ++-- 2 files changed, 2 insertions(+), 26 deletions(-) delete mode 100644 .github/workflows/npm_publish.yml diff --git a/.github/workflows/npm_publish.yml b/.github/workflows/npm_publish.yml deleted file mode 100644 index 7afb4ae..0000000 --- a/.github/workflows/npm_publish.yml +++ /dev/null @@ -1,24 +0,0 @@ -# name: npm_publish -# on: -# release: -# types: [published] - -# jobs: -# publish: -# runs-on: ubuntu-latest -# steps: -# - uses: actions/checkout@v4 -# - uses: actions/setup-node@v3 -# with: -# node-version: 18 -# - run: npm init --scope=nosto -y -# - run: npm install -# - run: npm run build -# - run: npm run test - -# - uses: JS-DevTools/npm-publish@v1 -# with: -# token: ${{ secrets.NPMJS_TOKEN }} -# access: "public" -# dry-run: false -# check-version: true diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b51656e..1ce828a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -29,7 +29,7 @@ jobs: release: needs: build runs-on: ubuntu-latest - if: github.ref == 'refs/heads/release-action' + if: github.ref == 'refs/heads/main' environment: name: production steps: @@ -54,7 +54,7 @@ jobs: @semantic-release/git branches: | [ - "release-action" + "main" ] env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}