-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (45 loc) · 1.33 KB
/
version-bump.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
name: Bump Version
on:
workflow_dispatch:
inputs:
bump-mode:
description: 'Select bump mode'
required: true
default: 'patch'
type: choice
options:
- patch
- minor
- major
push:
branches: [master]
jobs:
bump-version:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Setup JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'corretto'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0
- name: Retrieve New Version
run: bash ./.ci_steps/bump.sh ${{inputs.bump-mode}}
id: bump
- name: 'Checkout version-bump branch'
run: |
git fetch origin version-bump
git checkout version-bump
- name: Print Current Branch
run: echo "$(git branch --show-current)"
- name: Update Version to version-bump Branch
run: bash ./.ci_steps/update-version.sh ${{steps.bump.outputs.OLD_VERSION}} ${{steps.bump.outputs.NEW_VERSION}}
id: update
- name: Print Bump Results
run: |
echo "New Version: ${{steps.update.outputs.CURRENT_VERSION}}"