Skip to content

Commit ed8232f

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

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed

.github/workflows/releasebuild.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
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+
permissions:
23+
contents: read
24+
25+
jobs:
26+
build:
27+
runs-on: windows-latest
28+
29+
steps:
30+
- uses: actions/checkout@v4
31+
32+
- name: Add MSBuild to PATH
33+
uses: microsoft/setup-msbuild@v1.0.2
34+
35+
- name: Build
36+
working-directory: ${{env.GITHUB_WORKSPACE}}
37+
# Add additional options to the MSBuild command line here (like platform or verbosity level).
38+
# See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference
39+
run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH}}
40+
41+
- name: Create Release
42+
id: create_release
43+
uses: actions/create-release@v1
44+
env:
45+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46+
with:
47+
tag_name: ${{ github.ref }}
48+
release_name: Release ${{ github.ref }}
49+
body: Auto generated release
50+
draft: true
51+
prerelease: false
52+
53+
- name: Upload Assets to Release with a wildcard
54+
uses: shogo82148/actions-upload-release-asset@v1
55+
with:
56+
asset_path: "x64/Release/vmcli.exe"
57+
upload_url: ${{ steps.create_release.outputs.upload_url }}
58+

0 commit comments

Comments
 (0)