Skip to content

Commit

Permalink
feat: add script to update maven and gradle versions inside the readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Silthus committed Nov 11, 2021
1 parent b9eec76 commit 234f0fa
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,11 @@ jobs:
- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Grant execute permission for update-versions.sh
run: chmod +x update-versions.sh

- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_URL: "https://api.github.com/"
run: npx --legacy-peer-deps -p @semantic-release/changelog -p @semantic-release/git -p gradle-semantic-release-plugin -p semantic-release semantic-release
run: npx --legacy-peer-deps -p @semantic-release/changelog -p @semantic-release/git -p @semantic-release/exec -p gradle-semantic-release-plugin -p semantic-release semantic-release
6 changes: 6 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@
],
"plugins": [
"@semantic-release/commit-analyzer",
[
"@semantic-release/exec",
{
"prepareCmd": "./update-versions.sh ${nextRelease.version}"
}
],
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
"gradle-semantic-release-plugin",
Expand Down
1 change: 1 addition & 0 deletions update-versions.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
find ./Readme.md -type f -exec sed -E -i "s/(<)?(version|small)([:' >]+)?([0-9]\.[0-9]\.[0-9](-[a-z0-9]+\.?[0-9]*)?)(['<]?)/\1\2\3$1\6/g" {} \;

0 comments on commit 234f0fa

Please sign in to comment.