diff --git a/index.js b/index.js index ef55668..313ce23 100644 --- a/index.js +++ b/index.js @@ -57,10 +57,13 @@ class Action { fs.readdirSync(".").filter(fn => /\.s?nupkg$/.test(fn)).forEach(fn => fs.unlinkSync(fn)) - this._executeInProcess(`dotnet build -c Release ${this.projectFile}`) - - this._executeInProcess(`dotnet pack ${this.includeSymbols ? "--include-symbols -p:SymbolPackageFormat=snupkg" : ""} --no-build -c Release ${this.projectFile} -o .`) - + if (version.indexOf('-') == -1){ + this._executeInProcess(`dotnet build -c Release ${this.projectFile}`) + this._executeInProcess(`dotnet pack ${this.includeSymbols ? "--include-symbols -p:SymbolPackageFormat=snupkg" : ""} --no-build -c Release ${this.projectFile} -o .`) + } else { + this._executeInProcess(`dotnet build -c Debug ${this.projectFile}`) + this._executeInProcess(`dotnet pack ${this.includeSymbols ? "--include-symbols -p:SymbolPackageFormat=snupkg" : ""} --no-build -c Debug ${this.projectFile} -o .`) + } const packages = fs.readdirSync(".").filter(fn => fn.endsWith("nupkg")) console.log(`Generated Package(s): ${packages.join(", ")}`)