-
Notifications
You must be signed in to change notification settings - Fork 145
57 lines (49 loc) · 1.83 KB
/
post-release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Post Release
on:
release:
types: [ published ]
jobs:
update-readme:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Print tags
run: |
echo "$(git tag --sort=creatordate)"
echo "$(git tag --sort=creatordate | tail -n 2 | head -n 1)" | egrep -o '[0-9]+\.[0-9]+\.[0-9]+'
- name: Set old version
id: set_old_version
run: |
OLD_VERSION=$(echo "$(git tag --sort=creatordate | tail -n 2 | head -n 1)" | egrep -o '[0-9]+\.[0-9]+\.[0-9]+')
echo "old_version=$OLD_VERSION" >> $GITHUB_OUTPUT
- name: Set new version
id: set_new_version
run: |
NEW_VERSION=$(echo "${{ github.ref_name }}" | egrep -o '[0-9]+\.[0-9]+\.[0-9]+')
echo "new_version=$NEW_VERSION" >> "$GITHUB_OUTPUT"
- name: Update README - Maven
uses: MathieuSoysal/[email protected]
with:
files: README.md
prefix: "<version>"
suffix: "</version>"
version: ${{ steps.set_new_version.outputs.new_version }}
old-version: ${{ steps.set_old_version.outputs.old_version }}
with-checkout: false
- name: Update README - Groovy
uses: MathieuSoysal/[email protected]
with:
files: README.md
prefix: "hyperion:hyperion-*:"
version: ${{ steps.set_new_version.outputs.new_version }}
old-version: ${{ steps.set_old_version.outputs.old_version }}
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: update readme
title: Update readme
body: Update readme to reflect release changes
branch: update-readme
base: develop