generated from gdt050579/appcui-template
-
Notifications
You must be signed in to change notification settings - Fork 16
45 lines (39 loc) · 1.17 KB
/
increase_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
name: Version Increase
on:
push:
branches:
- main
workflow_dispatch:
inputs:
versionToUpdate:
description: 'Version to update'
required: true
default: 'minor'
type: choice
options:
- major
- minor
- patch
jobs:
version-ubuntu:
runs-on: [ubuntu-latest]
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Get Version to env and increase it
run: |
output=$(python .github/workflows/get_version_and_update.py GViewCore/include/GView.hpp ${{ github.event.inputs.versionToUpdate }})
echo "GVIEW_VERSION=$output" >> $GITHUB_ENV
- name: Show Version
run: echo "${{ env.GVIEW_VERSION }}"
- name: Commit files
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git commit -m "Updated GVIEW version ${{ env.GVIEW_VERSION }}" -a
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}