-
Notifications
You must be signed in to change notification settings - Fork 4
46 lines (44 loc) · 1.43 KB
/
bumpversion.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
name: Update file on PR merge
on:
pull_request:
branches:
- main
types: closed
jobs:
update_version:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
with:
# Fetch full depth, otherwise the last step overwrites the last commit's parent, essentially removing the graph.
fetch-depth: 0
- name: GenerateTag
id: name_tag
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
create_annotated_tag: true
default_bump: patch
dry_run: true
tag_prefix: v
- name: Update version.txt
run: |
echo "character(len=*), parameter :: version=\"${{ steps.name_tag.outputs.new_tag }}\"\n" > version.inc
- name: Amend the last commit
run: |
git config --global user.email "[email protected]"
git config --global user.name "OpenRCT2 git bot"
git commit -a --amend --no-edit
git push --force-with-lease
echo "Complete"name: Bump version
- name: Bump version and push tag
id: really_tag_version
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
create_annotated_tag: true
default_bump: patch
dry_run: false
tag_prefix: v