Skip to content

Commit cf38a77

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents 66cc414 + cd75efb commit cf38a77

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

.github/workflows/readme-version.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Update README Version
2+
3+
on:
4+
release:
5+
types:
6+
- published
7+
8+
jobs:
9+
update-version:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v2
15+
16+
- name: Update version in README
17+
run: |
18+
VERSION=$(echo $GITHUB_REF | sed 's/refs\/tags\///g')
19+
sed -E -i "s/\d+\.\d+\.\d+/$VERSION/g" README.md
20+
21+
- name: Commit and push changes
22+
run: |
23+
git config --global user.name "GitHub Actions Bot"
24+
git config --global user.email "collinjbarber@gmail.com"
25+
git add README.md
26+
git commit -m "Update version in README.md"
27+
git push

0 commit comments

Comments
 (0)