-
Notifications
You must be signed in to change notification settings - Fork 4
50 lines (43 loc) · 1.31 KB
/
increment-version.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
name: "Increment Version"
on:
workflow_dispatch:
inputs:
version_part:
description: 'Which part of the version to increment (patch, minor, major)'
required: false
default: 'patch'
push:
branches:
- "main"
jobs:
release:
name: "Increment patch version"
runs-on: "ubuntu-latest"
steps:
- uses: actions/[email protected]
- name: "Setup environment"
run: |
sudo apt-get update
sudo apt-get install python3-pip
sudo python3 -m pip install bumpversion
- name: "Bump version number"
run: |
VERSION_PART="${VERSION_PART:-patch}"
if ! echo "$COMMIT_MSG" | grep 'New release'; then
git config --local user.email "[email protected]"
git config --local user.name "QMK Bot"
bumpversion $VERSION_PART
fi
env:
COMMIT_MSG: ${{ github.event.head_commit.message }}
VERSION_PART: ${{ github.event.inputs.version_part }}
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: main
tags: true
- name: Trigger Release Action
run: ./trigger_action
env:
QMK_BOT_TOKEN: ${{ secrets.QMK_BOT_TOKEN }}