Skip to content

Commit 0614002

Browse files
committed
adding release build workflow
1 parent cc83165 commit 0614002

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

.github/workflows/releasebuild.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# This workflow uses actions that are not certified by GitHub.
2+
# They are provided by a third-party and are governed by
3+
# separate terms of service, privacy policy, and support
4+
# documentation.
5+
6+
name: MSBuild
7+
8+
on:
9+
push:
10+
tags:
11+
- 'v*'
12+
13+
env:
14+
# Path to the solution file relative to the root of the project.
15+
SOLUTION_FILE_PATH: vmcli.sln
16+
17+
# Configuration type to build.
18+
# You can convert this to a build matrix if you need coverage of multiple configuration types.
19+
# https://docs.github.com/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
20+
BUILD_CONFIGURATION: Release
21+
22+
jobs:
23+
build:
24+
runs-on: windows-latest
25+
26+
steps:
27+
- uses: actions/checkout@v4
28+
29+
- name: Add MSBuild to PATH
30+
uses: microsoft/setup-msbuild@v1.0.2
31+
32+
- name: Build
33+
working-directory: ${{env.GITHUB_WORKSPACE}}
34+
# Add additional options to the MSBuild command line here (like platform or verbosity level).
35+
# See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference
36+
run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH}}
37+
38+
- name: Create Release
39+
id: create_release
40+
uses: actions/create-release@v1
41+
env:
42+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43+
with:
44+
tag_name: ${{ github.ref }}
45+
release_name: Release ${{ github.ref }}
46+
body: Auto generated release
47+
draft: true
48+
prerelease: false
49+
50+
- name: Upload Assets to Release with a wildcard
51+
uses: shogo82148/actions-upload-release-asset@v1
52+
with:
53+
asset_path: "x64/Release/vmcli.exe"
54+
upload_url: ${{ steps.create_release.outputs.upload_url }}
55+

0 commit comments

Comments
 (0)