From 335512fc6fd67bb95f48d57b30a8ead15f5c6130 Mon Sep 17 00:00:00 2001 From: musti Date: Tue, 1 Oct 2024 19:20:36 +0300 Subject: [PATCH 1/8] fix: actions script --- .github/workflows/node.js.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 17d4d21..1e08f7b 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -20,5 +20,10 @@ jobs: with: node-version: ${{ matrix.node-version }} cache: 'npm' - - run: npm run build - - run: npm test + + - name: Install package.json dependencies with pnpm + run: npm install + + - name: Test with Jest + run: npm run test + From 90c24f14d554f364c9afabd454888768af1a3c82 Mon Sep 17 00:00:00 2001 From: musti Date: Tue, 1 Oct 2024 19:27:53 +0300 Subject: [PATCH 2/8] feat: npm publish --- .github/workflows/npm.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/npm.yml diff --git a/.github/workflows/npm.yml b/.github/workflows/npm.yml new file mode 100644 index 0000000..00c7ba5 --- /dev/null +++ b/.github/workflows/npm.yml @@ -0,0 +1,24 @@ +name: Publish to npm +on: + push: + branches: + - main + tags: + - '*' +jobs: + publish: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + - name: Set up Node.js + uses: actions/setup-node@v2 + with: + node-version: '20' + registry-url: 'https://registry.npmjs.org/' + - name: Install dependencies + run: npm install + - name: Publish to npm + run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} From 3ea74faa59610b0a8cf8773e5cc441669e248d63 Mon Sep 17 00:00:00 2001 From: musti Date: Tue, 1 Oct 2024 19:31:08 +0300 Subject: [PATCH 3/8] fix: npm sync --- .github/workflows/npm.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/npm.yml b/.github/workflows/npm.yml index 00c7ba5..3141998 100644 --- a/.github/workflows/npm.yml +++ b/.github/workflows/npm.yml @@ -1,23 +1,29 @@ name: Publish to npm + on: - push: - branches: - - main - tags: - - '*' + workflow_run: + workflows: ["Build"] + types: + - completed + jobs: publish: + if: ${{ github.event.workflow_run.conclusion == 'success' }} runs-on: ubuntu-latest + steps: - name: Checkout code uses: actions/checkout@v2 + - name: Set up Node.js uses: actions/setup-node@v2 with: - node-version: '20' + node-version: '20' registry-url: 'https://registry.npmjs.org/' + - name: Install dependencies run: npm install + - name: Publish to npm run: npm publish env: From 0411e984d13be42e94bb8010c1e8795b1583d40e Mon Sep 17 00:00:00 2001 From: musti Date: Tue, 1 Oct 2024 19:32:10 +0300 Subject: [PATCH 4/8] fix: wrong name --- .github/workflows/npm.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/npm.yml b/.github/workflows/npm.yml index 3141998..024c129 100644 --- a/.github/workflows/npm.yml +++ b/.github/workflows/npm.yml @@ -2,7 +2,7 @@ name: Publish to npm on: workflow_run: - workflows: ["Build"] + workflows: ["Function tests with Jest"] types: - completed From 598768a9b429cae254fe41bf83c6aa0310a2abb8 Mon Sep 17 00:00:00 2001 From: musti Date: Tue, 1 Oct 2024 19:33:27 +0300 Subject: [PATCH 5/8] fix: ignore github config --- .npmignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.npmignore b/.npmignore index a1bf5c7..3390ea0 100644 --- a/.npmignore +++ b/.npmignore @@ -9,4 +9,5 @@ coverage/ .DS_Store Thumbs.db .vscode/ -.idea/ \ No newline at end of file +.idea/ +.github/ From 24e1d76e9b95a9eab208ec28cff2d6d999588397 Mon Sep 17 00:00:00 2001 From: musti Date: Tue, 1 Oct 2024 19:37:58 +0300 Subject: [PATCH 6/8] fix: typo and name --- .github/workflows/node.js.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 1e08f7b..6ce13ad 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -1,4 +1,4 @@ -name: Function tests with Jest +name: Tests on: push: @@ -21,7 +21,7 @@ jobs: node-version: ${{ matrix.node-version }} cache: 'npm' - - name: Install package.json dependencies with pnpm + - name: Install package.json dependencies with npm run: npm install - name: Test with Jest From c465ad7d38bdf86ccc47d9f58696446bcbdbe5ca Mon Sep 17 00:00:00 2001 From: musti Date: Tue, 1 Oct 2024 19:38:51 +0300 Subject: [PATCH 7/8] fix: name --- .github/workflows/npm.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/npm.yml b/.github/workflows/npm.yml index 024c129..1fc9b7d 100644 --- a/.github/workflows/npm.yml +++ b/.github/workflows/npm.yml @@ -2,7 +2,7 @@ name: Publish to npm on: workflow_run: - workflows: ["Function tests with Jest"] + workflows: ["Tests"] types: - completed From c710794ded0330101eac7c8a8bcda79b70245ebe Mon Sep 17 00:00:00 2001 From: musti Date: Tue, 1 Oct 2024 19:41:14 +0300 Subject: [PATCH 8/8] fix: attempt to fix ci --- .github/workflows/npm.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/npm.yml b/.github/workflows/npm.yml index 1fc9b7d..eee4232 100644 --- a/.github/workflows/npm.yml +++ b/.github/workflows/npm.yml @@ -2,7 +2,7 @@ name: Publish to npm on: workflow_run: - workflows: ["Tests"] + workflows: ["Tests"] # Update this to match the new workflow name types: - completed