@@ -35,50 +35,44 @@ jobs:
3535 fi
3636
3737 # Get unique major.minor versions and find latest patch for each
38- # This gives us the latest 3 major versions with their latest patches
39- MAJOR_VERSIONS=$(echo $RELEASES | jq -r '.[]' | sed -E 's/([0-9]+\.[0-9]+)\..*/\1/' | uniq | head -3 )
38+ # This gives us the latest 2 major versions with their latest patches
39+ MAJOR_VERSIONS=$(echo $RELEASES | jq -r '.[]' | sed -E 's/([0-9]+\.[0-9]+)\..*/\1/' | uniq | head -2 )
4040
41- # Validate we have at least 3 major versions
41+ # Validate we have at least 2 major versions
4242 COUNT=$(echo "$MAJOR_VERSIONS" | wc -l | tr -d ' ')
43- if [[ "$COUNT" -lt 3 ]]; then
44- echo "❌ Not enough major versions available (found $COUNT, need 3 )"
43+ if [[ "$COUNT" -lt 2 ]]; then
44+ echo "❌ Not enough major versions available (found $COUNT, need 2 )"
4545 exit 1
4646 fi
4747
48- # Get the latest patch version for each of the 3 major versions
48+ # Get the latest patch version for each of the 2 major versions
4949 MAJOR_1=$(echo "$MAJOR_VERSIONS" | sed -n '1p')
5050 MAJOR_2=$(echo "$MAJOR_VERSIONS" | sed -n '2p')
51- MAJOR_3=$(echo "$MAJOR_VERSIONS" | sed -n '3p')
5251
5352 LATEST=$(echo $RELEASES | jq -r ".[] | select(startswith(\"$MAJOR_1\"))" | head -1)
54- MIDDLE=$(echo $RELEASES | jq -r ".[] | select(startswith(\"$MAJOR_2\"))" | head -1)
55- OLDEST=$(echo $RELEASES | jq -r ".[] | select(startswith(\"$MAJOR_3\"))" | head -1)
53+ OLDEST=$(echo $RELEASES | jq -r ".[] | select(startswith(\"$MAJOR_2\"))" | head -1)
5654
5755 # Validate version format (x.y.z)
58- for VERSION in $LATEST $MIDDLE $ OLDEST; do
56+ for VERSION in $LATEST $OLDEST; do
5957 if ! [[ $VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
6058 echo "❌ Invalid version format: $VERSION"
6159 exit 1
6260 fi
6361 done
6462
6563 echo "✅ Found valid versions:"
66- echo " Latest: $LATEST"
67- echo " Middle: $MIDDLE"
68- echo " Oldest: $OLDEST"
64+ echo " Latest (max): $LATEST"
65+ echo " Oldest (min): $OLDEST"
6966
7067 echo "latest=$LATEST" >> $GITHUB_OUTPUT
71- echo "middle=$MIDDLE" >> $GITHUB_OUTPUT
7268 echo "oldest=$OLDEST" >> $GITHUB_OUTPUT
7369
7470 # Get current values
7571 CURRENT_MAX=$(jq -r '.supportedVersions["vscode-max"]' packages/extester/package.json)
7672 CURRENT_MIN=$(jq -r '.supportedVersions["vscode-min"]' packages/extester/package.json)
77- CURRENT_MIDDLE=$(grep 'version: \[min,' .github/workflows/main.yml | sed -E 's/.*version: \[min, ([^,]+),.*/\1/' | tr -d ' ')
7873
7974 echo "current_max=$CURRENT_MAX" >> $GITHUB_OUTPUT
8075 echo "current_min=$CURRENT_MIN" >> $GITHUB_OUTPUT
81- echo "current_middle=$CURRENT_MIDDLE" >> $GITHUB_OUTPUT
8276
8377 - name : 🔎 Check if update needed
8478 id : check
@@ -89,19 +83,13 @@ jobs:
8983 if [[ "${{ steps.versions.outputs.latest }}" != "${{ steps.versions.outputs.current_max }}" ]]; then
9084 echo "📌 Max version changed: ${{ steps.versions.outputs.current_max }} → ${{ steps.versions.outputs.latest }}"
9185 NEEDS_UPDATE=true
92- CHANGES="${CHANGES}- Max : ${{ steps.versions.outputs.current_max }} → ${{ steps.versions.outputs.latest }}\n"
86+ CHANGES="${CHANGES}- vscode-max : ${{ steps.versions.outputs.current_max }} → ${{ steps.versions.outputs.latest }}\n"
9387 fi
9488
9589 if [[ "${{ steps.versions.outputs.oldest }}" != "${{ steps.versions.outputs.current_min }}" ]]; then
9690 echo "📌 Min version changed: ${{ steps.versions.outputs.current_min }} → ${{ steps.versions.outputs.oldest }}"
9791 NEEDS_UPDATE=true
98- CHANGES="${CHANGES}- Min: ${{ steps.versions.outputs.current_min }} → ${{ steps.versions.outputs.oldest }}\n"
99- fi
100-
101- if [[ "${{ steps.versions.outputs.middle }}" != "${{ steps.versions.outputs.current_middle }}" ]]; then
102- echo "📌 Middle version changed: ${{ steps.versions.outputs.current_middle }} → ${{ steps.versions.outputs.middle }}"
103- NEEDS_UPDATE=true
104- CHANGES="${CHANGES}- Middle: ${{ steps.versions.outputs.current_middle }} → ${{ steps.versions.outputs.middle }}\n"
92+ CHANGES="${CHANGES}- vscode-min: ${{ steps.versions.outputs.current_min }} → ${{ steps.versions.outputs.oldest }}\n"
10593 fi
10694
10795 if [[ "$NEEDS_UPDATE" = "false" ]]; then
@@ -135,70 +123,45 @@ jobs:
135123
136124 echo "✅ package.json updated successfully"
137125
138- - name : 📝 Update CI workflow matrix
139- if : steps.check.outputs.needs_update == 'true'
140- run : |
141- echo "Updating .github/workflows/main.yml..."
142-
143- # Update the version matrix in main.yml
144- sed -i "s/version: \[min, [0-9.]\+, max\]/version: [min, ${{ steps.versions.outputs.middle }}, max]/" \
145- .github/workflows/main.yml
146-
147- # Verify the update
148- UPDATED_MIDDLE=$(grep 'version: \[min,' .github/workflows/main.yml | sed -E 's/.*version: \[min, ([^,]+),.*/\1/' | tr -d ' ')
149-
150- if [[ "$UPDATED_MIDDLE" != "${{ steps.versions.outputs.middle }}" ]]; then
151- echo "❌ Failed to update main.yml correctly"
152- echo "Expected: ${{ steps.versions.outputs.middle }}"
153- echo "Got: $UPDATED_MIDDLE"
154- exit 1
155- fi
156-
157- echo "✅ main.yml updated successfully"
158-
159126 - name : 🔀 Create Pull Request
160127 if : steps.check.outputs.needs_update == 'true'
161128 id : create_pr
162129 uses : peter-evans/create-pull-request@v8.1.0
163130 with :
164131 token : ${{ secrets.PAT_TOKEN || secrets.GITHUB_TOKEN }}
165132 commit-message : |
166- chore: update VS Code version window to latest 3 releases
133+ chore: update VS Code version window to latest 2 releases
167134
168135 - vscode-min: ${{ steps.versions.outputs.current_min }} → ${{ steps.versions.outputs.oldest }}
169- - vscode-middle: ${{ steps.versions.outputs.current_middle }} → ${{ steps.versions.outputs.middle }}
170136 - vscode-max: ${{ steps.versions.outputs.current_max }} → ${{ steps.versions.outputs.latest }}
171137 branch : auto-update-vscode-versions
172138 delete-branch : true
173139 title : " Update VS Code version window (${{ steps.versions.outputs.oldest }} - ${{ steps.versions.outputs.latest }})"
174140 body : |
175141 ## 🔄 VS Code Version Window Update
176142
177- This PR updates the supported VS Code version window to the latest 3 stable releases.
143+ This PR updates the supported VS Code version window to the latest 2 stable major releases.
178144
179145 ### 📊 Version Changes
180146
181147 | Position | Before | After | Status |
182148 |----------|--------|-------|--------|
183- | **Min (Oldest)** | `${{ steps.versions.outputs.current_min }}` | `${{ steps.versions.outputs.oldest }}` | ${{ steps.versions.outputs.current_min != steps.versions.outputs.oldest && '✅ Updated' || '➖ No change' }} |
184- | **Middle** | `${{ steps.versions.outputs.current_middle }}` | `${{ steps.versions.outputs.middle }}` | ${{ steps.versions.outputs.current_middle != steps.versions.outputs.middle && '✅ Updated' || '➖ No change' }} |
185- | **Max (Latest)** | `${{ steps.versions.outputs.current_max }}` | `${{ steps.versions.outputs.latest }}` | ${{ steps.versions.outputs.current_max != steps.versions.outputs.latest && '✅ Updated' || '➖ No change' }} |
149+ | **Min** | `${{ steps.versions.outputs.current_min }}` | `${{ steps.versions.outputs.oldest }}` | ${{ steps.versions.outputs.current_min != steps.versions.outputs.oldest && '✅ Updated' || '➖ No change' }} |
150+ | **Max** | `${{ steps.versions.outputs.current_max }}` | `${{ steps.versions.outputs.latest }}` | ${{ steps.versions.outputs.current_max != steps.versions.outputs.latest && '✅ Updated' || '➖ No change' }} |
186151
187152 ### 📝 Files Modified
188153
189154 - ✅ [`packages/extester/package.json`](https://github.com/${{ github.repository }}/blob/${{ github.head_ref || github.ref_name }}/packages/extester/package.json) - Updated `vscode-min` and `vscode-max`
190- - ✅ [`.github/workflows/main.yml`](https://github.com/${{ github.repository }}/blob/${{ github.head_ref || github.ref_name }}/.github/workflows/main.yml) - Updated CI test matrix middle version
191155
192156 ### 🧪 Testing
193157
194- CI will automatically test against all 3 versions:
158+ CI will automatically test against both versions:
195159 - ✅ Min: `${{ steps.versions.outputs.oldest }}`
196- - ✅ Middle: `${{ steps.versions.outputs.middle }}`
197160 - ✅ Max: `${{ steps.versions.outputs.latest }}`
198161
199162 ### ✅ Review Checklist
200163
201- - [ ] All CI tests pass for all 3 versions
164+ - [ ] All CI tests pass for both versions
202165 - [ ] No breaking changes detected in test results
203166 - [ ] Page objects still work across all versions
204167 - [ ] Ready to merge and release
@@ -228,7 +191,7 @@ jobs:
228191 issue_number: ${{ steps.create_pr.outputs.pull-request-number }},
229192 body: `## 🧪 Testing Instructions
230193
231- The CI pipeline will automatically test all 3 versions. Monitor the test results in the checks below.
194+ The CI pipeline will automatically test both versions. Monitor the test results in the checks below.
232195
233196 ### 🔍 What to Review
234197
@@ -245,9 +208,6 @@ jobs:
245208 # Test with min version
246209 CODE_VERSION=min npm test
247210
248- # Test with middle version
249- CODE_VERSION=${{ steps.versions.outputs.middle }} npm test
250-
251211 # Test with max version
252212 CODE_VERSION=max npm test
253213 \`\`\`
@@ -287,13 +247,11 @@ jobs:
287247
288248 ### 📝 Manual Update Steps
289249
290- 1. Check the latest 3 VS Code stable versions at https://code.visualstudio.com/updates
250+ 1. Check the latest 2 VS Code stable versions at https://code.visualstudio.com/updates
291251 2. Update \`packages/extester/package.json\`:
292- - \`vscode-min\`: oldest of the 3 versions
293- - \`vscode-max\`: newest of the 3 versions
294- 3. Update \`.github/workflows/main.yml\`:
295- - Update the middle version in the test matrix
296- 4. Run tests and create a release
252+ - \`vscode-min\`: oldest of the 2 versions
253+ - \`vscode-max\`: newest of the 2 versions
254+ 3. Run tests and create a release
297255
298256 ---
299257
0 commit comments