Skip to content
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
7bdbc08
Update Node.js version and enhance workflow configuration (#1)
blytkerchan Mar 16, 2026
c544b75
Add @vercel/ncc for build process and update package scripts
blytkerchan Mar 16, 2026
138b1c7
fix: check out code before use
blytkerchan Mar 18, 2026
43aac1e
Add Dependabot auto-merge workflow
Copilot Apr 25, 2026
4e77739
Fix npm audit workflow failures
Copilot Apr 26, 2026
b1ce912
Update Node24-compatible workflow actions
blytkerchan Apr 26, 2026
bce4ea0
Update migrated action README references
blytkerchan Apr 28, 2026
38ff9a8
Add unit tests for action logic
blytkerchan Apr 28, 2026
b42d2ea
Fix PowerShell unit test glob
blytkerchan Apr 28, 2026
3acebef
Run unit tests with bash on Windows
blytkerchan Apr 28, 2026
adcf358
List unit test files explicitly
blytkerchan Apr 28, 2026
9903b5d
docs: align README action name
blytkerchan Apr 28, 2026
5b37bbd
ci: fix windows-2025 runner jobs failing on VS 2022 lookup
Copilot Jun 18, 2026
f6566b7
chore: install release-please (#4)
blytkerchan Jul 9, 2026
e4e0d65
Bump js-yaml from 3.13.1 to 3.15.0 (#5)
dependabot[bot] Jul 9, 2026
3e7627e
Bump flatted from 3.2.2 to 3.4.2 (#7)
dependabot[bot] Jul 9, 2026
6eb3836
Use DEPENDABOT_AUTOMERGE_TOKEN in dependabot automerge workflow
blytkerchan Jul 10, 2026
e2115e4
Bump minimatch from 3.1.2 to 3.1.5 (#6)
dependabot[bot] Jul 10, 2026
cb94b1b
Fix automerge: use pull_request_target instead of pull_request
blytkerchan Jul 10, 2026
22bcab4
Migrate ESLint config to flat config and bump to v10 (#9)
blytkerchan Jul 29, 2026
da94470
fix: stop dependabot automerge from merging past failing sibling chec…
blytkerchan Aug 2, 2026
49e26c7
docs: note branch-protection/matrix coupling in main.yml (#12)
blytkerchan Aug 2, 2026
4c2ebad
fix: adopt canonical hardened automerge template from guidance (#14)
blytkerchan Aug 2, 2026
d382dc9
chore: resync automerge workflow with guidance canonical template (#15)
blytkerchan Aug 2, 2026
6adb8f7
chore: resync automerge workflow with canonical template (#16)
blytkerchan Aug 3, 2026
b40c1fb
fix: resync automerge workflow with canonical template (guidance#15) …
blytkerchan Aug 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: 2
updates:
- package-ecosystem: npm
directory: /
schedule:
interval: weekly

- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
52 changes: 41 additions & 11 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,32 @@ on:
push:
branches:
- master
- dev
- main
- release/*
schedule:
- cron: '0 6 * * *'

jobs:
test:
name: default
runs-on: windows-latest
name: default (${{ matrix.runner }}, VS ${{ matrix.vsversion }})
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- runner: windows-2022
vsversion: "2022"
supports_arm32: true
- runner: windows-2025
vsversion: "2022"
supports_arm32: true
- runner: windows-2025-vs2026
vsversion: "2026"
supports_arm32: false
steps:
- name: Check out source code
uses: actions/checkout@v4
uses: actions/checkout@v6
- name: Download Internet
run: npm install
Comment on lines 41 to 42
- name: Run eslint
Expand All @@ -24,6 +39,7 @@ jobs:
uses: ./
with:
arch: amd64
vsversion: ${{ matrix.vsversion }}
- name: Compile and run some C code (amd64)
shell: cmd
run: |
Expand All @@ -33,50 +49,64 @@ jobs:
uses: ./
with:
arch: amd64_x86
vsversion: ${{ matrix.vsversion }}
- name: Compile and run some C code (x86)
shell: cmd
run: |
cl.exe hello.c
hello.exe
- name: Enable Developer Command Prompt (amd64_arm)
if: matrix.supports_arm32
uses: ./
with:
arch: amd64_arm
vsversion: ${{ matrix.vsversion }}
- name: Compile some C code (arm)
if: matrix.supports_arm32
shell: cmd
run: |
cl.exe hello.c
dumpbin /headers hello.exe
cl.exe /c hello.c
dumpbin /headers hello.obj
- name: Enable Developer Command Prompt (amd64_arm64)
uses: ./
with:
arch: amd64_arm64
vsversion: ${{ matrix.vsversion }}
- name: Compile some C code (arm64)
shell: cmd
run: |
cl.exe hello.c
dumpbin /headers hello.exe
cl.exe /c hello.c
dumpbin /headers hello.obj
audit:
name: npm audit
runs-on: ubuntu-latest
steps:
- name: Check out source code
uses: actions/checkout@v4
uses: actions/checkout@v6
- run: npm install
- run: npm audit --audit-level=moderate --production
- run: npm audit --audit-level=critical
alias-arch:
name: arch aliases
runs-on: windows-latest
name: arch aliases (${{ matrix.runner }}, VS ${{ matrix.vsversion }})
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- runner: windows-2022
vsversion: "2022"
- runner: windows-2025
vsversion: "2022"
steps:
- name: Check out source code
uses: actions/checkout@v4
uses: actions/checkout@v6
- name: Download Internet
run: npm install
Comment on lines 112 to 113
- name: Enable Developer Command Prompt
uses: ./
with:
arch: Win32
vsversion: ${{ matrix.vsversion }}
- name: Compile and run some C code
shell: cmd
run: |
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
name: release
runs-on: windows-latest
steps:
- name: Setup Developer Command Prompt
uses: ilammy/msvc-dev-cmd@release/v1
- name: Check out source code
uses: actions/checkout@v4
uses: actions/checkout@v6
- name: Setup Developer Command Prompt
uses: ./
- name: Compile and run some C code
shell: cmd
run: |
Expand All @@ -26,6 +26,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out source code
uses: actions/checkout@v4
uses: actions/checkout@v6
- run: npm audit --audit-level=moderate --production
- run: npm audit --audit-level=critical
6 changes: 3 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ inputs:
sdk:
description: Windows SDK number to build for
spectre:
description: Enable Specre mitigations
description: Enable Spectre mitigations
toolset:
description: VC++ compiler toolset version
uwp:
description: Build for Universal Windows Platform
vsversion:
description: The Visual Studio version to use. This can be the version number (e.g. 16.0 for 2019) or the year (e.g. "2019").
runs:
using: node20
main: index.js
using: node24
main: dist/index.js
branding:
icon: terminal
color: purple
1 change: 1 addition & 0 deletions dist/index.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion lib.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const EDITIONS = ['Enterprise', 'Professional', 'Community', 'BuildTools']
const YEARS = ['2022', '2019', '2017']

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const YEARS = ['2022', '2019', '2017']
const YEARS = ['2026', '2022', '2019', '2017']

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, @blytkerchan, this one?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TBH, to me it looks like this change probably isn't necessary at the moment, because the year seems not to be part of the path in this VS version. But if this changes someday, it could be useful and it shouldn't harm.


const VsYearVersion = {
'2026': '18.0',
'2022': '17.0',
'2019': '16.0',
'2017': '15.0',
Expand Down Expand Up @@ -112,7 +113,7 @@ function isPathVariable(name) {

function filterPathValue(path) {
let paths = path.split(';')
// Remove duplicates by keeping the first occurance and preserving order.
// Remove duplicates by keeping the first occurrence and preserving order.
// This keeps path shadowing working as intended.
function unique(value, index, self) {
return self.indexOf(value) === index
Expand Down
16 changes: 16 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"description": "GitHub Action to setup Developer Command Prompt for Microsoft Visual C++",
"main": "index.js",
"scripts": {
"build": "ncc build -m index.js -o dist",
"lint": "eslint index.js"
},
"repository": {
Expand All @@ -30,6 +31,7 @@
"@actions/core": "^1.10.0"
},
"devDependencies": {
"@vercel/ncc": "^0.38.3",
"eslint": "^7"
}
}