Skip to content

Commit f7def15

Browse files
authored
Add version update to release workflow (#24)
Resolves #23
1 parent a29b889 commit f7def15

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

.github/workflows/release.yml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,4 +103,27 @@ jobs:
103103
body: ${{ steps.build_changelog.outputs.changelog }}
104104
name: Release ${{ needs.version.outputs.RELEASE_VERSION }}
105105
tag: ${{ needs.version.outputs.RELEASE_VERSION }}
106-
token: ${{ secrets.PUSH_PAT }}
106+
token: ${{ secrets.PUSH_PAT }}
107+
update-version:
108+
runs-on: ubuntu-latest
109+
needs:
110+
- create_release
111+
- version
112+
steps:
113+
- name: 'Checkout Repository'
114+
uses: actions/checkout@v3
115+
with:
116+
token: ${{ secrets.PUSH_PAT }}
117+
- name: Prepare next dev version
118+
id: prepare_next_dev
119+
run: |
120+
sed -i -e 's/${{ needs.version.outputs.CURRENT_VERSION }}/${{ needs.version.outputs.NEXT_VERSION }}/g' gradle.properties
121+
sed -i -E -e 's/json-schema-validator(:|\/)[0-9]+\.[0-9]+\.[0-9]+/json-schema-validator\1${{ needs.version.outputs.RELEASE_VERSION }}/g' README.md
122+
sed -i -E -e 's/json-schema-validator(:|\/)[0-9]+\.[0-9]+\.[0-9]+(-SNAPSHOT)/json-schema-validator\1${{ needs.version.outputs.NEXT_VERSION }}/g' README.md
123+
- name: Commit next dev version
124+
id: commit_next_dev
125+
uses: EndBug/add-and-commit@v9
126+
with:
127+
add: "['gradle.properties', 'README.md']"
128+
default_author: github_actions
129+
message: "Prepare next version"

0 commit comments

Comments
 (0)