Skip to content

Commit 317f09c

Browse files
Update Build.yml
1 parent 1e673be commit 317f09c

File tree

1 file changed

+17
-7
lines changed

1 file changed

+17
-7
lines changed

.github/workflows/Build.yml

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -111,22 +111,29 @@ jobs:
111111
dotnet md2html -i ..\..\CHANGELOG.md -o ..\package\RTSCamera\CHANGELOG.html;
112112
working-directory: .\source\RTSCamera\
113113

114-
- name: Zip RTS Camera
115-
run: Compress-Archive -Path .\source\package\* -DestinationPath "${{env.ARTIFACT_NAME}}.zip";
116-
117114
- name: Upload a Build Artifact
118115
uses: actions/[email protected]
119116
with:
120117
# Artifact name
121118
name: ${{env.ARTIFACT_NAME}} ${{steps.dotenv.outputs.game_branch}}
122119
# A file, directory or wildcard pattern that describes what to upload
123-
path: ${{env.ARTIFACT_NAME}}.zip
120+
path: .\source\package\*
124121
# The desired behavior if no files are found using the provided path
122+
123+
- name: Zip RTS Camera
124+
run: Compress-Archive -Path .\source\package\* -DestinationPath "${{env.ARTIFACT_NAME}}.zip";
125+
if: >-
126+
contains(github.ref, 'refs/tags/release-v') ||
127+
contains(github.ref, 'refs/tags/release-b') ||
128+
contains(github.ref, 'refs/tags/release-e')
125129
126130
- name: Create a Release
127131
id: create_release
128132
uses: actions/[email protected]
129-
if: contains(github.ref, 'refs/tags/')
133+
if: >-
134+
contains(github.ref, 'refs/tags/release-v') ||
135+
contains(github.ref, 'refs/tags/release-b') ||
136+
contains(github.ref, 'refs/tags/release-e')
130137
env:
131138
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
132139
with:
@@ -151,7 +158,10 @@ jobs:
151158

152159
- name: Upload a Release Asset
153160
uses: actions/[email protected]
154-
if: contains(github.ref, 'refs/tags/')
161+
if: >-
162+
contains(github.ref, 'refs/tags/release-v') ||
163+
contains(github.ref, 'refs/tags/release-b') ||
164+
contains(github.ref, 'refs/tags/release-e')
155165
env:
156166
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
157167
with:
@@ -160,6 +170,6 @@ jobs:
160170
# The path to the asset you want to upload
161171
asset_path: ${{env.ARTIFACT_NAME}}.zip
162172
# The name of the asset you want to upload
163-
asset_name: ${{env.ARTIFACT_NAME}} ${{steps.dotenv.outputs.game_branch}}
173+
asset_name: ${{env.ARTIFACT_NAME}} ${{steps.dotenv.outputs.game_branch}}.zip
164174
# The content-type of the asset you want to upload. See the supported Media Types here: https://www.iana.org/assignments/media-types/media-types.xhtml for more information
165175
asset_content_type: application/zip

0 commit comments

Comments
 (0)