diff --git a/lib/main.js b/lib/main.js index 52c57d6..3d60487 100644 --- a/lib/main.js +++ b/lib/main.js @@ -28,7 +28,9 @@ function run() { let snapshot = ''; if (!process.env.GITHUB_REF.startsWith('refs/tags/')) { console.log(`⚠️ No tag found. Snapshot forced`); - snapshot = ' --snapshot'; + if (!args.includes('--snapshot')) { + snapshot = ' --snapshot'; + } } else { console.log(`✅ ${process.env.GITHUB_REF.split('/')[2]}} tag found`); diff --git a/src/main.ts b/src/main.ts index 4da0fec..f3ff9d5 100644 --- a/src/main.ts +++ b/src/main.ts @@ -11,7 +11,9 @@ async function run() { let snapshot = ''; if (!process.env.GITHUB_REF!.startsWith('refs/tags/')) { console.log(`⚠️ No tag found. Snapshot forced`); - snapshot = ' --snapshot'; + if (!args.includes('--snapshot')) { + snapshot = ' --snapshot'; + } } else { console.log(`✅ ${process.env.GITHUB_REF!.split('/')[2]}} tag found`); }