Skip to content

Commit

Permalink
Fix notification DC (#1008)
Browse files Browse the repository at this point in the history
  • Loading branch information
hippocampus-web3 authored Jan 23, 2024
1 parent ddc4773 commit d6c6354
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"lint": "lerna run lint",
"update-packages": "yarn changeset",
"increase-packages": "yarn changeset version",
"notification:prepare": "ts-node scripts/notification.cts"
"notification:prepare": "ts-node scripts/notification.ts"
},
"husky": {
"hooks": {
Expand Down Expand Up @@ -56,4 +56,4 @@
"typescript": "^5.0.4",
"yarn-audit-ci": "^1.2.0"
}
}
}
12 changes: 6 additions & 6 deletions scripts/notification.cts → scripts/notification.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { info, setFailed, setOutput } from '@actions/core'
const core = require('@actions/core')

type Package = {
name: string
Expand Down Expand Up @@ -35,8 +35,8 @@ const embedTemplate: Embed = {
const main = () => {
try {
if (!process.argv[2]) {
info('There is no release to notify')
setOutput('success', false)
core.info('There is no release to notify')
core.setOutput('success', false)
return
}
const publishedPackages = JSON.parse(process.argv[2]) as Package[]
Expand All @@ -49,10 +49,10 @@ const main = () => {
.join('\n'),
}

setOutput('embeds', [embed])
setOutput('success', true)
core.setOutput('embeds', [embed])
core.setOutput('success', true)
} catch (e) {
setFailed(`Error preparing message: ${e}`)
core.setFailed(`Error preparing message: ${e}`)
}
}

Expand Down

0 comments on commit d6c6354

Please sign in to comment.