Skip to content

Commit 0b579b5

Browse files
committed
Fix post release action
1 parent 92070ed commit 0b579b5

1 file changed

Lines changed: 7 additions & 10 deletions

File tree

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Publish new release
1+
name: Post release
22

33
on:
44
release:
@@ -8,21 +8,15 @@ permissions: write-all
88

99
env:
1010
WARDUINO: 'warduino'
11+
VERSIONNAME: ${{ github.ref_name }}
1112

1213
jobs:
13-
create-release:
14+
bump-in-warduino:
1415
runs-on: ubuntu-latest
1516
steps:
1617
# clone latch
1718
- uses: actions/checkout@v4
1819

19-
# update version
20-
- name: Update version in package.json
21-
run: |
22-
sed -i 's/"version": "[^"]*"/"version": "${{ env.VERSION }}"/' package.json
23-
env:
24-
VERSION: $(echo "${{ github.ref }}" | sed -e 's:v\(.*\):\1:')
25-
2620
# clone warduino
2721
- uses: actions/checkout@v4
2822
with:
@@ -42,6 +36,7 @@ jobs:
4236
- name: Update package.json in WARDuino
4337
run: |
4438
cd tests/latch
39+
VERSION=${VERSIONNAME#v}
4540
sed -i "s|\"latch\": \"file:./latch-[^\"]*\"|\"latch\": \"file:./latch-$VERSION.tgz\"|" package.json
4641
working-directory: 'warduino'
4742
env:
@@ -53,6 +48,7 @@ jobs:
5348
git config user.name 'github-actions[bot]'
5449
git config user.email 'github-actions[bot]@users.noreply.github.com'
5550
git add tests/latch/
51+
VERSION=${VERSIONNAME#v}
5652
git checkout -b bump/latch-$VERSION
5753
git commit -m "⬆️ Bump latch version"
5854
git push --set-upstream origin bump/latch-$VERSION
@@ -63,7 +59,8 @@ jobs:
6359
# create pull request
6460
- name: Create Pull Request
6561
run: |
66-
gh pr create --title "⬆️ Bump latch to $VERSION" --body "Bumping latch to \`$VERSION\`" --base main --head bump/latch-$VERSION --label dependencies
62+
VERSION=${VERSIONNAME#v}
63+
gh pr create --title "⬆️ Bump latch to $VERSIONNAME" --body "Bumping latch to \`$VERSIONNAME\`" --base main --head bump/latch-$VERSION --label dependencies
6764
working-directory: 'warduino'
6865
env:
6966
VERSION: $(echo "${{ github.ref }}" | sed -e 's:v\(.*\):\1:')

0 commit comments

Comments
 (0)