Skip to content

Commit

Permalink
fix: remove deprecated set_output command #7
Browse files Browse the repository at this point in the history
  • Loading branch information
alirezanet committed May 8, 2023
1 parent 421b32f commit 859000d
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ class Action {
this._executeInProcess(`git tag ${TAG}`)
this._executeInProcess(`git push origin ${TAG}`)

process.stdout.write(`::set-output name=VERSION::${TAG}` + os.EOL)
process.stdout.write(`VERSION=${TAG}` + os.EOL)

}

_pushPackage(version, name) {
Expand Down Expand Up @@ -78,12 +79,12 @@ class Action {
const packageFilename = packages.filter(p => p.endsWith(".nupkg"))[0],
symbolsFilename = packages.filter(p => p.endsWith(".snupkg"))[0]

process.stdout.write(`::set-output name=PACKAGE_NAME::${packageFilename}` + os.EOL)
process.stdout.write(`::set-output name=PACKAGE_PATH::${path.resolve(packageFilename)}` + os.EOL)
process.stdout.write(`PACKAGE_NAME=${packageFilename}` + os.EOL)
process.stdout.write(`PACKAGE_PATH=${path.resolve(packageFilename)}` + os.EOL)

if (symbolsFilename) {
process.stdout.write(`::set-output name=SYMBOLS_PACKAGE_NAME::${symbolsFilename}` + os.EOL)
process.stdout.write(`::set-output name=SYMBOLS_PACKAGE_PATH::${path.resolve(symbolsFilename)}` + os.EOL)
process.stdout.write(`SYMBOLS_PACKAGE_NAME=${symbolsFilename}` + os.EOL)
process.stdout.write(`SYMBOLS_PACKAGE_PATH=${path.resolve(symbolsFilename)}` + os.EOL)
}

if (this.tagCommit)
Expand All @@ -106,7 +107,7 @@ class Action {
console.log('404 response, assuming new package')
this._pushPackage(this.version, this.packageName)
}


if (res.statusCode == 200) {
res.setEncoding("utf8")
Expand Down

0 comments on commit 859000d

Please sign in to comment.