From e36b0b958a33035863c8b072b058819f0247ea20 Mon Sep 17 00:00:00 2001 From: Sanya Andreichuk Date: Mon, 22 Mar 2021 13:44:53 +0200 Subject: [PATCH] Update publish.yml --- .github/workflows/publish.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 2f56241..a3c181d 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -2,7 +2,7 @@ name: Publish Nuget on: push: tags: - - v* + - '**' workflow_dispatch: @@ -14,11 +14,14 @@ jobs: - uses: actions/checkout@v2 - name: Build run: | + tagParts=(${GITHUB_REF//\// }) + VERSION="${tagParts[2]}" + VERSION="${VERSION//v}" nuget restore cd sdk/Notifo.SDK/ - msbuild Notifo.SDK.csproj /verbosity:normal /t:Rebuild /p:Configuration=Release /p:OutputPath=../.. + msbuild Notifo.SDK.csproj /verbosity:normal /t:Rebuild /p:Configuration=Release /p:Version=$VERSION /p:OutputPath=../.. cd ../Notifo.SDK.FirebasePlugin/ - msbuild Notifo.SDK.FirebasePlugin.csproj /verbosity:normal /t:Rebuild /p:Configuration=Release /p:OutputPath=../.. + msbuild Notifo.SDK.FirebasePlugin.csproj /verbosity:normal /t:Rebuild /p:Configuration=Release /p:Version=$VERSION /p:OutputPath=../.. - name: Publish NuGet run: | dotnet nuget push *.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{secrets.NUGET_API_KEY}} --skip-duplicate