Skip to content

Commit 48b44ac

Browse files
committed
Add option to create tags only
1 parent a2ae817 commit 48b44ac

File tree

2 files changed

+22
-4
lines changed

2 files changed

+22
-4
lines changed

.github/workflows/upgrade-unity.yml

+12-4
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ on:
1919
required: true
2020
type: boolean
2121
default: false
22+
tagsOnly:
23+
description: 'Only create tags'
24+
required: true
25+
type: boolean
26+
default: false
2227
customParameters:
2328
description: 'Custom cli arguments'
2429
required: false
@@ -42,6 +47,7 @@ jobs:
4247
UNITY_VERSION: ${{ inputs.unityVersion }}
4348
CREATE_TAGS: ${{ inputs.createTags }}
4449
URP_BRANCH: ${{ inputs.urp }}
50+
TAGS_ONLY: ${{ inputs.tagsOnly }}
4551
CUSTOM_PARAMETERS: ${{ inputs.customParameters }}
4652

4753
- uses: actions/checkout@v3
@@ -93,6 +99,7 @@ jobs:
9399
echo "upgrade_name -> ${{ steps.upgrade_name.outputs.NAME }}"
94100
95101
- name: Build project
102+
if: ${{ !inputs.tagsOnly }}
96103
uses: JohannesDeml/unity-builder@no-quit-parameter
97104
env:
98105
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
@@ -105,20 +112,19 @@ jobs:
105112
allowDirtyBuild: true
106113

107114
- name: Delete build folder with elevated rights
115+
if: ${{ !inputs.tagsOnly }}
108116
run: sudo rm -rf ./build
109117

110-
- name: Log git status
111-
run: git status
112-
113118
- name: Set git user
114119
run: |
120+
git status
115121
git config --global user.email "[email protected]"
116122
git config --global user.name "$GIT_USER"
117123
env:
118124
GIT_USER: ${{ github.actor }}
119125

120-
121126
- name: Render template
127+
if: ${{ !inputs.tagsOnly }}
122128
id: template
123129
uses: chuhlomin/[email protected]
124130
with:
@@ -127,6 +133,7 @@ jobs:
127133
unityversion: ${{ steps.upgrade_name.outputs.NAME }}
128134
129135
- name: Create Pull Request
136+
if: ${{ !inputs.tagsOnly }}
130137
uses: peter-evans/create-pull-request@v4
131138
with:
132139
token: ${{ secrets.PR_GITHUB_TOKEN }}
@@ -137,6 +144,7 @@ jobs:
137144
body: ${{ steps.template.outputs.result }}
138145

139146
- name: Add tags
147+
if: ${{ inputs.createTags || inputs.tagsOnly }}
140148
run: |
141149
if [[ "$URP_BRANCH" == "true" ]]
142150
then

Assets/Scripts/Editor/BuildScript.cs

+10
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
// --------------------------------------------------------------------------------------------------------------------
2+
// <copyright file="BuildScript.cs">
3+
// Copyright (c) 2023 Johannes Deml. All rights reserved.
4+
// </copyright>
5+
// <author>
6+
// Johannes Deml
7+
8+
// </author>
9+
// --------------------------------------------------------------------------------------------------------------------
10+
111
using System;
212
using System.Collections.Generic;
313
using System.IO;

0 commit comments

Comments
 (0)