Skip to content

Commit 6a408a6

Browse files
authored
Update build_event_prep.yml
1 parent cfe6c46 commit 6a408a6

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/workflows/build_event_prep.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,10 @@ jobs:
127127
run: |
128128
npm install js-yaml --save
129129
node .github/scripts/generate-readme.js
130+
- name: Update package.json with version
131+
working-directory: src
132+
run: |
133+
sed -i 's/"version": "[^"]*"/"version": "${{ needs.label.outputs.release-version }}"/' package.json
130134
- name: Checkout Pull Request Branch Again
131135
uses: actions/checkout@v4
132136
with:
@@ -140,8 +144,8 @@ jobs:
140144
git config user.email "GitHub-Actions[bot]@users.noreply.github.com"
141145
cp ${{ github.workspace }}/tmp/updated-changelog.md CHANGELOG.md
142146
cp ${{ github.workspace }}/tmp/new-README.md README.md
143-
git add CHANGELOG.md README.md
147+
git add CHANGELOG.md README.md package.json
144148
if ! git diff-index --quiet HEAD; then
145-
git commit -m "Bot: Updating CHANGELOG and README for release based on #${{ github.event.pull_request.number }}"
149+
git commit -m "Bot: Updating CHANGELOG, README and package.json for release based on #${{ github.event.pull_request.number }}"
146150
git push origin ${{ github.event.pull_request.head.ref }}
147151
fi

0 commit comments

Comments
 (0)