From 5c8867a42d8d2f28526393daaea29aeda7180a67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karol=20W=C3=B3jcik?= Date: Wed, 20 Mar 2024 22:26:05 +0100 Subject: [PATCH] release test --- .github/workflows/build.yaml | 16 +++++++++++----- .../DocFxToTemplate.Tool.csproj | 6 +++--- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 35330d2..4139db3 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -15,18 +15,24 @@ jobs: run: dotnet restore - name: build run: dotnet build --no-restore - # release to NuGet if push of tag release: runs-on: ubuntu-latest needs: build - if: startsWith(github.ref, 'refs/tags/') + #if: startsWith(github.ref, 'refs/tags/v') steps: - uses: actions/checkout@v3 + - name: Set VERSION variable from tag + run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV - name: Setup .NET 8 SDK uses: actions/setup-dotnet@v3 with: dotnet-version: 8.0.x - name: pack - run: dotnet pack --configuration Release -o ./bin/nupkg - - name: push - run: dotnet nuget push ./bin/nupkg/*.nupkg -k ${{ secrets.NUGET_KEY }} -s https://api.nuget.org/v3/index.json + run: dotnet pack --configuration Release -o ./dist/nupkg -p:Version=${VERSION} + #- name: push + #run: dotnet nuget push ./dist/nupkg/*.nupkg -k ${{ secrets.NUGET_KEY }} -s https://api.nuget.org/v3/index.json + - name: Archive NuGet packages + uses: actions/upload-artifact@v4 + with: + name: nuget-packages + path: ./dist/nupkg \ No newline at end of file diff --git a/src/DocFxToTemplate.Tool/DocFxToTemplate.Tool.csproj b/src/DocFxToTemplate.Tool/DocFxToTemplate.Tool.csproj index e6b1cb0..c4797f7 100644 --- a/src/DocFxToTemplate.Tool/DocFxToTemplate.Tool.csproj +++ b/src/DocFxToTemplate.Tool/DocFxToTemplate.Tool.csproj @@ -18,9 +18,9 @@ - - + + - +