Skip to content
This repository was archived by the owner on Aug 15, 2025. It is now read-only.

Commit 5321bc1

Browse files
committed
chore: warning unmatched version
1 parent 5dd34f0 commit 5321bc1

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

dist/index.js

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ import {
1515
} from './type'
1616
import { upsertComment } from './comment'
1717

18+
// Currently, we only support numeric version.
19+
const versionReg = /^\d+/
20+
1821
/**
1922
* The main function for the action.
2023
* @returns {Promise<void>} Resolves when the action is complete.
@@ -66,14 +69,12 @@ export async function run(): Promise<void> {
6669
}
6770

6871
const globber = await glob.create(filePattern)
69-
const versionReg = /^\d+/
70-
7172
const files: File[] = []
7273
for await (const file of globber.globGenerator()) {
7374
const relativePath = path.relative(pwd, file)
7475
const versionM = path.basename(file).match(versionReg)
7576
if (!versionM) {
76-
core.info(`failed to get version, ignore ${file}`)
77+
core.warning(`failed to get version, ignore ${file}`)
7778
continue
7879
}
7980
const version = versionM[0]

0 commit comments

Comments
 (0)