-
Notifications
You must be signed in to change notification settings - Fork 4
42 lines (36 loc) · 1.01 KB
/
bump.yaml
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: bump
on:
pull_request:
types: [closed]
branches:
- 'main'
jobs:
bump-versions:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Git setup 🔧
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: Get PR labels 🏷️
id: pr-labels
uses: joerick/[email protected]
- name: Bump Version ✨
run: |
set -ex
pip install --no-cache-dir bump2version
python ./.github/callBump2version.py ${{steps.pr-labels.outputs.labels}}
- name: Push Results 🚀
id: pushResults
run: |
if git merge-base --is-ancestor HEAD @{u} ; then
echo "No push necessary"
else
echo "Version bumps happened. Pushing now..."
git push
fi