diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7b20e59..844f939 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -33,7 +33,7 @@ jobs: - name: Get version from project id: get_version run: | - VERSION=$(dotnet run --project Frends.Web -- --version 2>/dev/null || echo "1.0.0") + VERSION=$(grep -oP '\K[^<]+' Frends.Web/Frends.Web.csproj) echo "version=$VERSION" >> $GITHUB_OUTPUT - name: Pack NuGet package diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f4bdef7..173cff7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -29,4 +29,10 @@ jobs: run: dotnet build --no-restore - name: Test - run: dotnet test --no-build --verbosity normal --framework net6.0 \ No newline at end of file + run: dotnet test --no-build --verbosity normal --framework net6.0 + + - name: Get version from project + id: get_version + run: | + VERSION=$(grep -oP '\K[^<]+' Frends.Web/Frends.Web.csproj) + echo "Version detected: $VERSION" \ No newline at end of file