From d3319aba3fba5a155a12181b60715c2e4755fab9 Mon Sep 17 00:00:00 2001 From: Wang Guan Date: Sat, 14 Dec 2024 21:27:52 +0900 Subject: [PATCH 01/13] bump version --- socket.io-serverless/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/socket.io-serverless/package.json b/socket.io-serverless/package.json index 6f8a920..0d2535d 100644 --- a/socket.io-serverless/package.json +++ b/socket.io-serverless/package.json @@ -1,7 +1,7 @@ { "name": "socket.io-serverless", "description": "A custom socket.io build to run in Cloudflare workers.", - "version": "0.1.0-beta4", + "version": "0.2.0", "type": "module", "dependencies": {}, "files": [ From 2834b94b2ea7fdee77305a2545e08fa4078bbd32 Mon Sep 17 00:00:00 2001 From: Wang Guan Date: Sat, 14 Dec 2024 21:38:47 +0900 Subject: [PATCH 02/13] github action to publish --- .github/workflows/publish-npm.yaml | 23 +++++++++++++++++++++++ socket.io-serverless/package.json | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/publish-npm.yaml diff --git a/.github/workflows/publish-npm.yaml b/.github/workflows/publish-npm.yaml new file mode 100644 index 0000000..b6ce386 --- /dev/null +++ b/.github/workflows/publish-npm.yaml @@ -0,0 +1,23 @@ +on: + push: + tags: + - "v**" + branches: + - main + workflow_dispatch: + pull_request: {} # NOTE: worktree would be a temporal merge commit + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: "20" + - run: make patch-upstream lib-build + - uses: JS-DevTools/npm-publish@v3 + with: + token: ${{ secrets.NPM_TOKEN }} + dry-run: ${{ github.event_name != 'push' }} + package: ./socket.io-serverless \ No newline at end of file diff --git a/socket.io-serverless/package.json b/socket.io-serverless/package.json index 0d2535d..0e2c07f 100644 --- a/socket.io-serverless/package.json +++ b/socket.io-serverless/package.json @@ -1,7 +1,7 @@ { "name": "socket.io-serverless", "description": "A custom socket.io build to run in Cloudflare workers.", - "version": "0.2.0", + "version": "0.2.0-rc1", "type": "module", "dependencies": {}, "files": [ From 29e12747390c56f416fbe625fd75aa1bedcccffb Mon Sep 17 00:00:00 2001 From: Wang Guan Date: Sat, 14 Dec 2024 21:41:33 +0900 Subject: [PATCH 03/13] dry run except on tag push --- .github/workflows/publish-npm.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-npm.yaml b/.github/workflows/publish-npm.yaml index b6ce386..5c6e834 100644 --- a/.github/workflows/publish-npm.yaml +++ b/.github/workflows/publish-npm.yaml @@ -19,5 +19,5 @@ jobs: - uses: JS-DevTools/npm-publish@v3 with: token: ${{ secrets.NPM_TOKEN }} - dry-run: ${{ github.event_name != 'push' }} + dry-run: ${{ github.event_name != 'push' || !startsWith(github.ref, 'refs/tags/' }} package: ./socket.io-serverless \ No newline at end of file From 550895c5838f8f9d42a9a7c241e108b8d5334a2f Mon Sep 17 00:00:00 2001 From: Wang Guan Date: Sat, 14 Dec 2024 21:42:34 +0900 Subject: [PATCH 04/13] make github happy --- .github/workflows/publish-npm.yaml | 2 +- socket.io | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-npm.yaml b/.github/workflows/publish-npm.yaml index 5c6e834..f1acabe 100644 --- a/.github/workflows/publish-npm.yaml +++ b/.github/workflows/publish-npm.yaml @@ -19,5 +19,5 @@ jobs: - uses: JS-DevTools/npm-publish@v3 with: token: ${{ secrets.NPM_TOKEN }} - dry-run: ${{ github.event_name != 'push' || !startsWith(github.ref, 'refs/tags/' }} + dry-run: ${{ !startsWith(github.ref, 'refs/tags/' }} package: ./socket.io-serverless \ No newline at end of file diff --git a/socket.io b/socket.io index d0fc720..91e1c8b 160000 --- a/socket.io +++ b/socket.io @@ -1 +1 @@ -Subproject commit d0fc72042068e7eaef448941add617f05e1ec236 +Subproject commit 91e1c8b3584054db6072046404a24e79a17c1367 From 5dcd28fe7c3777a0ba1793bbe45fe49d22f99a9d Mon Sep 17 00:00:00 2001 From: Wang Guan Date: Sat, 14 Dec 2024 21:46:34 +0900 Subject: [PATCH 05/13] fix --- .github/workflows/publish-npm.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-npm.yaml b/.github/workflows/publish-npm.yaml index f1acabe..a541cb0 100644 --- a/.github/workflows/publish-npm.yaml +++ b/.github/workflows/publish-npm.yaml @@ -19,5 +19,5 @@ jobs: - uses: JS-DevTools/npm-publish@v3 with: token: ${{ secrets.NPM_TOKEN }} - dry-run: ${{ !startsWith(github.ref, 'refs/tags/' }} + dry-run: ${{ ! ( github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') ) }} package: ./socket.io-serverless \ No newline at end of file From 4387fa7bc3fd2c16d899bfb7d8aa97070c5cc4f5 Mon Sep 17 00:00:00 2001 From: Wang Guan Date: Sat, 14 Dec 2024 21:47:49 +0900 Subject: [PATCH 06/13] fix ci --- .github/workflows/publish-npm.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-npm.yaml b/.github/workflows/publish-npm.yaml index a541cb0..c23440d 100644 --- a/.github/workflows/publish-npm.yaml +++ b/.github/workflows/publish-npm.yaml @@ -19,5 +19,5 @@ jobs: - uses: JS-DevTools/npm-publish@v3 with: token: ${{ secrets.NPM_TOKEN }} - dry-run: ${{ ! ( github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') ) }} + dry-run: !startsWith(github.ref, 'refs/tags/') package: ./socket.io-serverless \ No newline at end of file From b20b0863ba102a8c64151b0908bff993362d257d Mon Sep 17 00:00:00 2001 From: Wang Guan Date: Sat, 14 Dec 2024 21:48:45 +0900 Subject: [PATCH 07/13] try --- .github/workflows/publish-npm.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-npm.yaml b/.github/workflows/publish-npm.yaml index c23440d..5e9d3c7 100644 --- a/.github/workflows/publish-npm.yaml +++ b/.github/workflows/publish-npm.yaml @@ -19,5 +19,5 @@ jobs: - uses: JS-DevTools/npm-publish@v3 with: token: ${{ secrets.NPM_TOKEN }} - dry-run: !startsWith(github.ref, 'refs/tags/') + dry-run: ${{ !startsWith(github.ref, 'refs/tags/') } package: ./socket.io-serverless \ No newline at end of file From a366fa66b524682b75de8a255a94b0fb860976dc Mon Sep 17 00:00:00 2001 From: Wang Guan Date: Sat, 14 Dec 2024 21:51:23 +0900 Subject: [PATCH 08/13] fix --- .github/workflows/publish-npm.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-npm.yaml b/.github/workflows/publish-npm.yaml index 5e9d3c7..8abf706 100644 --- a/.github/workflows/publish-npm.yaml +++ b/.github/workflows/publish-npm.yaml @@ -19,5 +19,5 @@ jobs: - uses: JS-DevTools/npm-publish@v3 with: token: ${{ secrets.NPM_TOKEN }} - dry-run: ${{ !startsWith(github.ref, 'refs/tags/') } - package: ./socket.io-serverless \ No newline at end of file + dry-run: ${{ !(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')) }} + package: ./socket.io-serverless \ No newline at end of file From 004c9416a72741df5b8fc121c608d25dfa0b14c5 Mon Sep 17 00:00:00 2001 From: Wang Guan Date: Sat, 14 Dec 2024 21:52:21 +0900 Subject: [PATCH 09/13] init git submodule --- .github/workflows/publish-npm.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/publish-npm.yaml b/.github/workflows/publish-npm.yaml index 8abf706..16b305e 100644 --- a/.github/workflows/publish-npm.yaml +++ b/.github/workflows/publish-npm.yaml @@ -15,6 +15,7 @@ jobs: - uses: actions/setup-node@v3 with: node-version: "20" + - run: git submodule init && git submodule update - run: make patch-upstream lib-build - uses: JS-DevTools/npm-publish@v3 with: From f1a6623d73c45ee260c5ddd66f0ff97af054ecc7 Mon Sep 17 00:00:00 2001 From: Wang Guan Date: Sat, 14 Dec 2024 21:53:52 +0900 Subject: [PATCH 10/13] setup pnpm --- .github/workflows/publish-npm.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/publish-npm.yaml b/.github/workflows/publish-npm.yaml index 16b305e..9409be7 100644 --- a/.github/workflows/publish-npm.yaml +++ b/.github/workflows/publish-npm.yaml @@ -12,11 +12,17 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 with: node-version: "20" + + - uses: pnpm/action-setup@v4 + - run: git submodule init && git submodule update + - run: make patch-upstream lib-build + - uses: JS-DevTools/npm-publish@v3 with: token: ${{ secrets.NPM_TOKEN }} From bfabe1a4ecf5f2e131e7fd38eebb9b6c6a1e20e2 Mon Sep 17 00:00:00 2001 From: Wang Guan Date: Sat, 14 Dec 2024 21:57:05 +0900 Subject: [PATCH 11/13] fix --- .github/workflows/publish-npm.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish-npm.yaml b/.github/workflows/publish-npm.yaml index 9409be7..ff5b37c 100644 --- a/.github/workflows/publish-npm.yaml +++ b/.github/workflows/publish-npm.yaml @@ -18,9 +18,11 @@ jobs: node-version: "20" - uses: pnpm/action-setup@v4 - + - run: git submodule init && git submodule update + - run: pnpm install + - run: make patch-upstream lib-build - uses: JS-DevTools/npm-publish@v3 From 845c7c87f0bc0da5f498be6cf002ee12eceed2e5 Mon Sep 17 00:00:00 2001 From: Wang Guan Date: Sat, 14 Dec 2024 22:02:07 +0900 Subject: [PATCH 12/13] fix --- .github/workflows/publish-npm.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-npm.yaml b/.github/workflows/publish-npm.yaml index ff5b37c..a230ee5 100644 --- a/.github/workflows/publish-npm.yaml +++ b/.github/workflows/publish-npm.yaml @@ -18,7 +18,7 @@ jobs: node-version: "20" - uses: pnpm/action-setup@v4 - + - run: git submodule init && git submodule update - run: pnpm install @@ -29,4 +29,4 @@ jobs: with: token: ${{ secrets.NPM_TOKEN }} dry-run: ${{ !(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')) }} - package: ./socket.io-serverless \ No newline at end of file + package: ./socket.io-serverless/package.json \ No newline at end of file From 8186859197a88a94f2f5232794512109456c9f71 Mon Sep 17 00:00:00 2001 From: Wang Guan Date: Sat, 14 Dec 2024 22:03:37 +0900 Subject: [PATCH 13/13] set workflow name --- .github/workflows/{publish-npm.yaml => build-publish-npm.yaml} | 2 ++ 1 file changed, 2 insertions(+) rename .github/workflows/{publish-npm.yaml => build-publish-npm.yaml} (96%) diff --git a/.github/workflows/publish-npm.yaml b/.github/workflows/build-publish-npm.yaml similarity index 96% rename from .github/workflows/publish-npm.yaml rename to .github/workflows/build-publish-npm.yaml index a230ee5..ae62bda 100644 --- a/.github/workflows/publish-npm.yaml +++ b/.github/workflows/build-publish-npm.yaml @@ -1,3 +1,5 @@ +name: build & publish npm + on: push: tags: