Skip to content

Commit 3828aca

Browse files
committed
fix: stop depending on @actions/core
1 parent 57a3a3d commit 3828aca

3 files changed

Lines changed: 15 additions & 100 deletions

File tree

index.js

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,23 @@
11
// @ts-check
22

3-
const core = require('@actions/core');
3+
const { env } = require("node:process");
4+
const { appendFileSync } = require("node:fs");
5+
6+
function setGitHubActionsOutput(name, value) {
7+
if (env.GITHUB_OUTPUT) {
8+
const output = `${name}=${value}\n`;
9+
appendFileSync(env.GITHUB_OUTPUT, output);
10+
}
11+
}
412

513
function verifyConditions() {
6-
core.setOutput("new-release-published", "false");
14+
setGitHubActionsOutput("new-release-published", "false");
715
}
816

917
function generateNotes(_pluginConfig, { nextRelease }) {
10-
core.setOutput("new-release-published", "true");
11-
core.setOutput("new-release-version", nextRelease.version);
12-
core.setOutput("new-release-git-tag", nextRelease.gitTag);
18+
setGitHubActionsOutput("new-release-published", "true");
19+
setGitHubActionsOutput("new-release-version", nextRelease.version);
20+
setGitHubActionsOutput("new-release-git-tag", nextRelease.gitTag);
1321
}
1422

1523
module.exports = {

package-lock.json

Lines changed: 2 additions & 92 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,6 @@
2828
"@semantic-release/github"
2929
]
3030
},
31-
"dependencies": {
32-
"@actions/core": "^1.10.0"
33-
},
3431
"volta": {
3532
"node": "16.18.0",
3633
"npm": "8.19.2"

0 commit comments

Comments
 (0)