forked from chayxana/Restaurant-App
-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
36 lines (29 loc) 路 943 Bytes
/
action.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
name: "Bumping SemVer"
description: "Bumping SemVer"
inputs:
service-name:
description: 'Service name'
required: true
service-type:
description: 'Service type, e.g (gradle, dotnet, golang)'
required: false
outputs:
current-version:
description: "Current Version number"
value: ${{ steps.version.outputs.current-number }}
new-version:
description: "Next bumped Version number"
value: ${{ steps.version.outputs.next-number }}
runs:
using: "composite"
steps:
- id: version
run: |
CURR_VER=$(cat ${{ inputs.service-name }}/version)
SERVICE_TYPE=${{ inputs.service-type }}
chmod +x ./src/scripts/semver
NEW_VER=$(./src/scripts/semver bump patch $CURR_VER)
echo $NEW_VER > ${{ inputs.service-name }}/version
echo ::set-output name=current-number::${CURR_VER}
echo ::set-output name=next-number::${NEW_VER}
shell: bash