From 1a4a65629313c0970276aac05340e04d1da94cb2 Mon Sep 17 00:00:00 2001 From: jerbob92 Date: Mon, 11 May 2020 18:42:31 +0200 Subject: [PATCH] Update main.yml --- .github/workflows/main.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1577c3a..2bd9e5c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -28,15 +28,19 @@ jobs: nuget-version: '5.x' - run: nuget restore KlippaOCRAPI.sln + - name: Check if Git tag exists + run: echo "::set-env name=HEAD_TAG::$(git tag --points-at HEAD)" + - name: Build Project run: | cd "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\" .\MSBuild.exe $Env:GITHUB_WORKSPACE\KlippaOCRAPI /t:Build /p:Configuration=Release - name: Build and push NuGet + if: env.HEAD_TAG != '' run: | cd $Env:GITHUB_WORKSPACE - nuget pack KlippaOCRAPI.nuspec + nuget pack KlippaOCRAPI.nuspec -Version $Env:HEAD_TAG nuget push *.nupkg -source https://www.nuget.org/ - uses: actions/upload-artifact@v2