diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 010d46f..6023b68 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -15,14 +15,17 @@ jobs: git branch --remote --contains | grep origin/main - name: Set VERSION variable from tag - run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV + run: echo "VERSION=${GITHUB_REF_NAME#v}" >> $GITHUB_ENV + - uses: actions/setup-dotnet@v3 with: dotnet-version: "8.0.x" cache: true cache-dependency-path: src/**/packages.lock.json + - run: dotnet restore --locked-mode - - run: dotnet pack --no-restore --include-symbols -o . /p:Version=${VERSION} + + - run: dotnet pack --no-restore --include-symbols -o . /p:PackageVersion=${VERSION} - name: Deploy to NuGet run: dotnet nuget push *.nupkg --api-key $NUGET_AUTH_TOKEN --source https://api.nuget.org/v3/index.json