Skip to content

Commit fd4cf3a

Browse files
authored
ci: add windows-latest to the js-sdk publish test matrix (#113) (#147)
#146 covered cli/mcp/python-sdk publish workflows but missed js-sdk-publish (issue #113 predates the js-sdk package, so it wasn't on the list). Same treatment: node 18/20/22 stay ubuntu-only with a windows-latest leg on node 20, workflow_dispatch for on-demand matrix runs, and the event-scoped publish guard (publish requires an actual tag push). The js-sdk's PR-level Windows coverage already exists via the contract-tests js-sdk-tests job.
1 parent 763b863 commit fd4cf3a

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

.github/workflows/js-sdk-publish.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: Publish JS SDK to npm
22

33
on:
4+
workflow_dispatch: # run the test matrix on demand (publish still requires a tag)
45
push:
56
tags:
67
- "js-sdk-v*" # Trigger on tags like js-sdk-v0.1.0, js-sdk-v1.0.0
@@ -10,14 +11,20 @@ permissions:
1011

1112
jobs:
1213
test:
13-
runs-on: ubuntu-latest
14+
runs-on: ${{ matrix.os }}
1415
defaults:
1516
run:
1617
working-directory: packages/js-sdk
1718

1819
strategy:
20+
fail-fast: false
1921
matrix:
22+
os: [ubuntu-latest]
2023
node-version: [18, 20, 22]
24+
include:
25+
# Windows coverage on the LTS line only (issue #113).
26+
- os: windows-latest
27+
node-version: 20
2128

2229
steps:
2330
- name: Checkout
@@ -44,6 +51,9 @@ jobs:
4451

4552
publish:
4653
needs: test
54+
# Event-scoped: a workflow_dispatch (even one targeting a tag ref) runs
55+
# tests only; publishing requires an actual tag push.
56+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
4757
runs-on: ubuntu-latest
4858
defaults:
4959
run:

0 commit comments

Comments
 (0)