diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 1a8bf56..d2970b1 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -1,38 +1,11 @@ -name: Publish + +name: Publish on: release: types: [ published ] jobs: - build: - runs-on: windows-latest - - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Setup PowerShell Policy - run: Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Force - - - name: Install .NET 6 - run: choco install dotnet-sdk - - - name: Restore - run: dotnet restore - - - name: Build - run: dotnet build -c Release -v normal -p:Version=${{ github.ref_name }} - - - name: Pack (Beta) - run: dotnet pack -c Release --include-symbols --no-build -v normal -o $env:GITHUB_WORKSPACE -p:PackageVersion=${{ github.ref_name }}-beta - if: "github.event.release.prerelease" - - - name: Pack (Stable) - run: dotnet pack -c Release --include-symbols --no-build -v normal -o $env:GITHUB_WORKSPACE -p:PackageVersion=${{ github.ref_name }} - if: "!github.event.release.prerelease" - - - name: Publish - run: | - cd $env:GITHUB_WORKSPACE - dotnet nuget push "*.nupkg" -k ${{ secrets.NUGET_KEY }} --skip-duplicate -s https://api.nuget.org/v3/index.json + deploy: + secrets: inherit + uses: dragonfruitnetwork/workflows/.github/workflows/nuget-publish.yml@master