mirror of
https://github.com/actions/setup-dotnet.git
synced 2025-02-22 23:20:30 +07:00
feat: register problem matcher on action
This commit is contained in:
parent
0dbcf760bf
commit
16e40a26d7
10
dist/setup/index.js
vendored
10
dist/setup/index.js
vendored
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user