Skip to content

Commit 7ce72d5

Browse files
committed
[FIX] config: fix release flow
Apparentlyn relying on a JSON output was not a good idea and might have been dropepd by github recently (over the last months). This PR fixes the flow by outputting the variables independently without relying on a JSON pack/unpack which is ultimately more efficient. Task: 0 X-original-commit: f809d67
1 parent 75ceaa4 commit 7ce72d5

File tree

2 files changed

+15
-11
lines changed

2 files changed

+15
-11
lines changed

.github/workflows/release.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,26 @@ jobs:
1818
# parse-message will fail on invalid commit title/body
1919
run: |
2020
npm i @actions/core @actions/github --no-save &&\
21-
echo "data=$(node tools/parse_message.cjs)" >> $GITHUB_OUTPUT
21+
node tools/parse_message.cjs
2222
# generate all builds
2323
- name: Build
2424
run: npm ci && npm run dist
2525
- name: Release
2626
uses: ncipollo/release-action@v1.12.0
2727
with:
28-
tag: ${{ fromJSON(steps.parse.outputs.data).version }}
29-
body: ${{ fromJSON(steps.parse.outputs.data).body }}
28+
tag: ${{ steps.parse.outputs.version }}
29+
body: ${{ steps.parse.outputs.body }}
3030
artifacts: "./dist/*.*"
31+
<<<<<<< 75ceaa4aa7974c715f686df149c6b163cede274e
3132
makeLatest: false
3233
prerelease: ${{ fromJSON(steps.parse.outputs.data).prerelease }}
34+
||||||| a962b505273e81729189d63af578f475d3fcfec7
35+
makeLatest: true
36+
prerelease: ${{ fromJSON(steps.parse.outputs.data).prerelease }}
37+
=======
38+
makeLatest: true
39+
prerelease: ${{ steps.parse.outputs.prerelease }}
40+
>>>>>>> 190b235adba3f734583a2848ed06e6503df1980c
3341
- name: Publish
3442
run: npm publish
3543
env:

tools/parse_message.cjs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,10 @@ try {
5252
// find version
5353
const version = package.version;
5454

55-
console.log(
56-
JSON.stringify({
57-
title,
58-
version,
59-
body: commitLines.join("\n"),
60-
prerelease: version.includes("alpha"),
61-
})
62-
);
55+
core.setOutput("title", title);
56+
core.setOutput("version", version);
57+
core.setOutput("body", commitLines.join("\n"));
58+
core.setOutput("prerelease", version.includes("alpha"));
6359
} catch (error) {
6460
core.setFailed(error.message);
6561
}

0 commit comments

Comments
 (0)