diff --git a/.github/workflows/release-dotnet-nuget.yml b/.github/workflows/release-dotnet-nuget.yml index 4a3a26e..7b12dec 100644 --- a/.github/workflows/release-dotnet-nuget.yml +++ b/.github/workflows/release-dotnet-nuget.yml @@ -34,12 +34,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 - - name: Get version - id: get_version - run: | - tag_name=${{ github.event.release.tag_name }} - echo ::set-output name=VERSION::${tag_name:1} - shell: bash - name: Add msbuild to PATH uses: microsoft/setup-msbuild@v1.0.0 - name: Setup nuget @@ -54,8 +48,29 @@ jobs: - name: Restore packages run: nuget restore - name: Build with msbuild - run: msbuild -p:Configuration=Release -p:Version=${{ steps.get_version.outputs.VERSION }} + run: msbuild -p:Configuration=Release -p:Version=${{ github.event.release.tag_name }} - name: Pack nuget packages - run: dotnet pack --configuration Release --no-build -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg -p:PackageVersion=${{ steps.get_version.outputs.VERSION }} + run: dotnet pack --configuration Release --no-build --output nupkgs -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg -p:PackageVersion=${{ github.event.release.tag_name }} - name: Publish nuget packages - run: dotnet nuget push **/*.nupkg --source "github" \ No newline at end of file + run: dotnet nuget push **/*.nupkg --source "github" + - name: Upload artifacts + uses: actions/upload-artifact@v1 + with: + name: nupkgs + path: nupkgs + + release: + needs: publish + runs-on: ubuntu-latest + steps: + - name: Download artifacts + uses: actions/download-artifact@v1 + with: + name: nupkgs + path: nupkgs + - name: Release artifacts + uses: skx/github-action-publish-binaries@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + args: 'nupkgs/*' \ No newline at end of file