2020 pull-requests : write
2121 steps :
2222 - name : Checkout
23- uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
24- with :
25- persist-credentials : false
26-
27- - name : Install pnpm
28- uses : pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
23+ uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
2924 with :
3025 persist-credentials : false
3126
@@ -34,16 +29,19 @@ jobs:
3429 git config user.name "github-actions[bot]"
3530 git config user.email "github-actions[bot]@users.noreply.github.com"
3631
32+ - name : Install pnpm
33+ uses : pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
34+
3735 - name : Setup Node.js
3836 uses : actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
3937 with :
4038 node-version : ' lts/*'
4139
42- # No need to install dependencies - pnpm version works without them
40+ # No need to install dependencies - npm version works without them
4341 - name : Version bump
4442 id : version
4543 run : |
46- pnpm version "$VERSION_TYPE" --no-git-tag-version
44+ npm version "$VERSION_TYPE" --no-git-tag-version
4745 VERSION=$(jq -r '.version' package.json)
4846 echo "version=$VERSION" >> $GITHUB_OUTPUT
4947 env :
6765
6866 # Generate release notes with or without previous tag
6967 if [ -n "$LAST_TAG" ]; then
70- NOTES =$(gh api \
68+ RELEASE_NOTES =$(gh api \
7169 --method POST \
7270 -H "Accept: application/vnd.github+json" \
7371 "/repos/$GITHUB_REPOSITORY/releases/generate-notes" \
7674 -f "previous_tag_name=$LAST_TAG" \
7775 --jq '.body')
7876 else
79- NOTES =$(gh api \
77+ RELEASE_NOTES =$(gh api \
8078 --method POST \
8179 -H "Accept: application/vnd.github+json" \
8280 "/repos/$GITHUB_REPOSITORY/releases/generate-notes" \
8583 --jq '.body')
8684 fi
8785
88- # Save to file to handle multiline content
89- echo "$NOTES" > release-notes.md
86+ # Set release notes as environment variable for PR body
87+ echo "RELEASE_NOTES<<EOF" >> $GITHUB_ENV
88+ echo "$RELEASE_NOTES" >> $GITHUB_ENV
89+ echo "EOF" >> $GITHUB_ENV
9090 env :
9191 GH_TOKEN : ${{ github.token }}
9292 VERSION : ${{ steps.version.outputs.version }}
9898 branch : release/v${{ steps.version.outputs.version }}
9999 delete-branch : true
100100 title : " Release v${{ steps.version.outputs.version }}"
101- body-path : release-notes.md
101+ body : |
102+ ${{ env.RELEASE_NOTES }}
102103 commit-message : " chore: release v${{ steps.version.outputs.version }}"
103- add-paths : |
104- package.json
105- pnpm.lock
106104 labels : |
107105 Type: Release
108106 assignees : ${{ github.actor }}
0 commit comments