Skip to content

Commit f1944db

Browse files
committed
ci: Adds Bump Semantic Version Job
1 parent b7ec5ed commit f1944db

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,43 @@ name: Deploy
22

33
on:
44
workflow_dispatch:
5+
inputs:
6+
level:
7+
description: 'Version for Release (Allowed: major, minor, patch)'
8+
default: 'minor'
9+
required: true
510

611
env:
712
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
813
UNITY_VERSION: 2020.1.15f1
914
PROJECT_PATH: Test
1015

1116
jobs:
17+
bump-semvar:
18+
name: Create New Semantic Tag
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout Project
22+
uses: actions/[email protected]
23+
24+
- name: Get Latest Tag
25+
uses: actions-ecosystem/action-get-latest-tag@v1
26+
id: get-latest-tag
27+
if: ${{ github.event.inputs.level != '' }}
28+
with:
29+
semver_only: true
30+
31+
- name: Bump Semantic Version
32+
uses: actions-ecosystem/action-bump-semver@v1
33+
id: bump-semver
34+
if: ${{ github.event.inputs.level != '' }}
35+
with:
36+
current_version: ${{ steps.get-latest-tag.outputs.tag }}
37+
level: ${{ github.event.inputs.level }}
38+
39+
- name: Send Bumped Semvar
40+
run: echo "Semvar => ${{ steps.bump-semver.outputs.new_version }}"
41+
1242
checklicense:
1343
name: Check for Unity License
1444
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)