From 4750ebbb65cd1493531b8634e4039e26bde8036c Mon Sep 17 00:00:00 2001 From: softprops Date: Sun, 10 Mar 2024 00:53:18 -0500 Subject: [PATCH 1/2] make pattern error opt in --- CHANGELOG.md | 2 ++ src/main.ts | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a52cbb06a..b19c8f13f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ ## 2.0.2 (unreleased) +- Revisit approach to [#384](https://github.com/softprops/action-gh-release/pull/384) making unresolved pattern failures opt-in + ## 2.0.1 - Add support for make_latest property [#304](https://github.com/softprops/action-gh-release/pull/304) via [@samueljseay](https://github.com/samueljseay) diff --git a/src/main.ts b/src/main.ts index 02185de7c..be5566903 100644 --- a/src/main.ts +++ b/src/main.ts @@ -25,7 +25,11 @@ async function run() { if (config.input_files) { const patterns = unmatchedPatterns(config.input_files); patterns.forEach((pattern) => { - throw new Error(`⚠️ Pattern '${pattern}' does not match any files.`); + if (config.input_fail_on_unmatched_files) { + throw new Error(`⚠️ Pattern '${pattern}' does not match any files.`); + } else { + console.warn(`🤔 Pattern '${pattern}' does not match any files.`); + } }); if (patterns.length > 0 && config.input_fail_on_unmatched_files) { throw new Error(`⚠️ There were unmatched files`); From 9bd1969b6c118dd6824a814a9a60ed0c70a2faf6 Mon Sep 17 00:00:00 2001 From: softprops Date: Sun, 10 Mar 2024 00:55:15 -0500 Subject: [PATCH 2/2] changelog link --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b19c8f13f..ab9a21a51 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ ## 2.0.2 (unreleased) -- Revisit approach to [#384](https://github.com/softprops/action-gh-release/pull/384) making unresolved pattern failures opt-in +- Revisit approach to [#384](https://github.com/softprops/action-gh-release/pull/384) making unresolved pattern failures opt-in [#417](https://github.com/softprops/action-gh-release/pull/417) ## 2.0.1