@@ -40,26 +40,25 @@ jobs:
40
40
node-version : 18
41
41
- name : Install dependencies
42
42
uses : bahmutov/npm-install@v1
43
- - name : Preview release
44
- id : semantic -release
43
+ - name : Generate release notes
44
+ id : generate -release-notes
45
45
run : |
46
46
# locally get to the result of merging the current branch into the base branch (destination)
47
47
git checkout -b ${{ github.base_ref }} ${{ github.event.after }}
48
- unset GITHUB_ACTIONS; npx semantic-release --no-ci --dry-run > output.txt
49
- OUTPUT=$(cat output.txt | base64 -w 0)
50
- echo "::set-output name=releaseNote::$OUTPUT"
51
- # echo "releaseNote=$OUTPUT" >> $GITHUB_OUTPUT
48
+ unset GITHUB_ACTIONS
49
+ RELEASE_NOTES=$(npx semantic-release --no-ci --dry-run | base64 -w 0)
50
+ echo "releaseNotes=$RELEASE_NOTES" >> $GITHUB_OUTPUT
52
51
env :
53
52
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
54
53
NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
55
54
- name : Report semantic release in PR
56
55
uses : actions/github-script@v3
57
- if : ${{ steps.semantic -release.outputs.releaseNote != '' }}
56
+ if : ${{ steps.generate -release-notes .outputs.releaseNotes != '' }}
58
57
with :
59
58
github-token : ${{ secrets.GITHUB_TOKEN }}
60
59
script : |
61
60
// build release note
62
- const semanticReleaseOutput = Buffer.from('${{ steps.semantic -release.outputs.releaseNote }}', 'base64').toString('utf8');
61
+ const semanticReleaseOutput = Buffer.from('${{ steps.generate -release-notes .outputs.releaseNotes }}', 'base64').toString('utf8');
63
62
const semanticReleaseLogMatch = /^[[0-9:\sAMPM]+\]\s\[semantic-release\].*$/;
64
63
const lines = semanticReleaseOutput.split('\n');
65
64
const lastSemanticReleaseLogIndex = [...lines]
0 commit comments