feat: register problem matcher on action

This commit is contained in:
Nogic 2025-01-13 20:49:34 +09:00
parent 0dbcf760bf
commit 16e40a26d7
2 changed files with 19 additions and 4 deletions

10
dist/setup/index.js vendored
View File

@ -94047,6 +94047,11 @@ const qualityOptions = [
'preview',
'ga'
];
/**
* The problem matcher files to be registered with the runner.
* https://github.com/actions/toolkit/blob/main/docs/problem-matchers.md
*/
const problemMatchers = ['csc.json', 'dotnet-format.json'];
function run() {
return __awaiter(this, void 0, void 0, function* () {
try {
@ -94104,8 +94109,9 @@ function run() {
const cacheDependencyPath = core.getInput('cache-dependency-path');
yield (0, cache_restore_1.restoreCache)(cacheDependencyPath);
}
const matchersPath = path_1.default.join(__dirname, '..', '..', '.github');
core.info(`##[add-matcher]${path_1.default.join(matchersPath, 'csc.json')}`);
for (const file of problemMatchers) {
core.info(`##[add-matcher]${path_1.default.join(__dirname, '..', '..', '.github', file)}`);
}
}
catch (error) {
core.setFailed(error.message);

View File

@ -19,6 +19,12 @@ const qualityOptions = [
export type QualityOptions = (typeof qualityOptions)[number];
/**
* The problem matcher files to be registered with the runner.
* https://github.com/actions/toolkit/blob/main/docs/problem-matchers.md
*/
const problemMatchers = ['csc.json', 'dotnet-format.json'];
export async function run() {
try {
//
@ -89,8 +95,11 @@ export async function run() {
await restoreCache(cacheDependencyPath);
}
const matchersPath = path.join(__dirname, '..', '..', '.github');
core.info(`##[add-matcher]${path.join(matchersPath, 'csc.json')}`);
for (const file of problemMatchers) {
core.info(
`##[add-matcher]${path.join(__dirname, '..', '..', '.github', file)}`
);
}
} catch (error) {
core.setFailed(error.message);
}