Skip to content

Commit 843a4bc

Browse files
authored
Create dotnet.yml
1 parent 51e1c9f commit 843a4bc

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

.github/workflows/dotnet.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: "Build SharpSQLTools "
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- releases/*
8+
9+
jobs:
10+
build:
11+
runs-on: windows-2019
12+
steps:
13+
- name: checkout
14+
uses: actions/checkout@v1
15+
- name: Build DotNET40
16+
run: |
17+
cd "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\"
18+
.\MSBuild.exe -p:Configuration=Release $Env:GITHUB_WORKSPACE\
19+
- name: Upload a Build Artifact
20+
uses: actions/upload-artifact@v2.2.2
21+
with:
22+
# Artifact name
23+
name: SharpSQLTools.exe
24+
path: D:\a\SharpSQLTools\SharpSQLTools\SharpSQLTools\bin\Release\SharpSQLTools.exe
25+
- name: zip_exe
26+
shell: powershell
27+
run: Compress-Archive -Path D:\a\SharpSQLTools\SharpSQLTools\SharpSQLTools\bin\Release\SharpSQLTools.exe -DestinationPath D:\a\SharpSQLTools\SharpSQLTools\SharpSQLTools\bin\Release\SharpSQLTools.zip
28+
- name: Create Release
29+
id: create_release
30+
uses: actions/create-release@v1
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.TOKEN }}
33+
with:
34+
tag_name: ${{ github.run_number }}
35+
release_name: Release ${{ github.run_number }}
36+
draft: false
37+
- name: Upload Release Asset
38+
id: upload-release-asset
39+
uses: actions/upload-release-asset@v1
40+
env:
41+
GITHUB_TOKEN: ${{ secrets.TOKEN }}
42+
with:
43+
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
44+
asset_path: D:\a\SharpSQLTools\SharpSQLTools\SharpSQLTools\bin\Release\SharpSQLTools.zip
45+
asset_name: SharpSQLTools.zip
46+
asset_content_type: application/zip

0 commit comments

Comments
 (0)