Skip to content

Commit

Permalink
add prerelease version like Debug
Browse files Browse the repository at this point in the history
  • Loading branch information
pairbit authored Jun 26, 2022
1 parent fe51815 commit 00986b6
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(", ")}`)

Expand Down

0 comments on commit 00986b6

Please sign in to comment.