diff --git a/.github/workflows/deploy-nuget.yaml b/.github/workflows/deploy-nuget.yaml new file mode 100644 index 0000000..0958162 --- /dev/null +++ b/.github/workflows/deploy-nuget.yaml @@ -0,0 +1,41 @@ +name: Deploy To Nuget + +on: + push: + tags: + - "[0-9]+.[0-9]+.[0-9]" + paths-ignore: + - "**.md" + - ".vscode/**" + +concurrency: + group: deploy-${{ github.ref_name }} + cancel-in-progress: true + +jobs: + test: + uses: ./.github/workflows/tests-base.yaml + + build-push: + name: Build and Publish + needs: [test] + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v3 + + - uses: actions/setup-dotnet@v1 + with: + dotnet-version: "6.0.x" + + - name: Restore packages + run: dotnet restore + + - name: Create Pack + run: dotnet pack --no-restore -o packages /p:PackageVersion=${{ github.ref_name }} + + - name: Publish to Nuget + run: |- + dotnet nuget push "packages/*.nupkg" \ + --skip-duplicate \ + --api-key ${{ secrets.NUGET__API_KEY }} \ + --source https://api.nuget.org/v3/index.json