Skip to content

Bugfixes/399 change operations order (#400) #68

Bugfixes/399 change operations order (#400)

Bugfixes/399 change operations order (#400) #68

name: On release update readme to have the correct version
on:
release:
types:
- published # It seems that you can publish directly witout creating
jobs:
replace_version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Modify version number in README
uses: vyan024/file-regex-replace-2023
with:
regex: '=[0-9]+\.[0-9]+\.[0-9]+ '
replacement: '=${{ github.event.release.tag_name }} '
include: '^README\.md' # Optional, defaults to ".*"
- name: Modify version number in release action
uses: vyan024/file-regex-replace-2023
with:
regex: '"[0-9]+\.[0-9]+\.[0-9]+"'
replacement: '=${{ github.event.release.tag_name }} '
include: '^\.github\/workflows\/on_workflow_dispatch_perform_maven_release\.yml' # Optional, defaults to ".*"
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.TOKEN_FOR_GITHUB }}
commit-message: "Updated readme to have version ${{ github.event.release.tag_name }} in"
committer: GitHub <noreply@github.com>
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
signoff: false
base: main
branch: chore/update-readme-version
branch-suffix: timestamp
delete-branch: true
title: '🤖 Update readme version to ${{ github.event.release.tag_name }}'
body: |
This pull request has been generated by run of GitHub action ".github/workflows/on_release_update_readme.yml"
draft: false