forked from errbotio/errbot
-
Notifications
You must be signed in to change notification settings - Fork 1
42 lines (40 loc) · 1.23 KB
/
update_release_branch.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
---
name: Auto update release version
on: # yamllint disable-line rule:truthy
push:
branches:
- release-please--branches--master
jobs:
set-version:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout branch
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 # ratchet:actions/checkout@v3
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- name: Dump job context
env:
JOB_CONTEXT: ${{ toJson(job) }}
run: echo "$JOB_CONTEXT"
- name: Dump steps context
env:
STEPS_CONTEXT: ${{ toJson(steps) }}
run: echo "$STEPS_CONTEXT"
- name: Set release version
id: set_release_version
env:
MAJOR: "1"
MINOR: "2"
PATCH: "3"
run: |
echo "$MAJOR $MINOR $PATCH"
echo The Title of your PR is ${{ github.event.pull_request.title }}
file=$(find . -name "version.py")
sed -i "s/^VERSION .*$/VERSION = \"$MAJOR.$MINOR.$PATCH\"/" $file
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: set release version