From 6f598ec1dbd0b9859e2723aeabf9b08845e65dd0 Mon Sep 17 00:00:00 2001 From: Max Novak Date: Wed, 9 Oct 2024 17:38:06 +0300 Subject: [PATCH] Publish for versin tags --- .github/workflows/nuget.yml | 8 ++++++++ GoogleMapsApi/GoogleMapsApi.csproj | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/nuget.yml b/.github/workflows/nuget.yml index 62288cf..6dac09e 100644 --- a/.github/workflows/nuget.yml +++ b/.github/workflows/nuget.yml @@ -18,6 +18,14 @@ jobs: with: dotnet-version: '7.0.x' + - name: Get version from tag + id: get_version + run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT + + - name: Update version in project file + run: | + sed -i 's/0.0.0<\/Version>/${{ steps.get_version.outputs.VERSION }}<\/Version>/' GoogleMapsApi/GoogleMapsApi.csproj + - name: Restore dependencies run: dotnet restore diff --git a/GoogleMapsApi/GoogleMapsApi.csproj b/GoogleMapsApi/GoogleMapsApi.csproj index a18bccb..c189263 100644 --- a/GoogleMapsApi/GoogleMapsApi.csproj +++ b/GoogleMapsApi/GoogleMapsApi.csproj @@ -2,7 +2,7 @@ net8.0;net6.0;netstandard2.0 latest - 1.2.5 + 0.0.0 True True GoogleMapsApi