diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml new file mode 100644 index 0000000..432c12f --- /dev/null +++ b/.github/workflows/dotnet.yml @@ -0,0 +1,47 @@ +name: Publish to VS Marketplace + +env: + config: Release + solution: vs-extension.sln + vsixContainer: ${{ github.workspace }}\vs-extension.vsix + +on: + push: + branches: + - master + +jobs: + publish: + runs-on: windows-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Add MSBuild to PATH + uses: microsoft/setup-msbuild@v1.0.0 + - uses: nuget/setup-nuget@v1 + with: + nuget-version: "5.x" + + - name: Add VSTest to PATH + uses: darenm/Setup-VSTest@v1 + + - name: NuGet restore ${{ env.solution }} + run: nuget restore ${{ env.solution }} + + - name: MSBuild ${{ env.solution }} + run: | + msbuild ${{ env.solution }} /p:Configuration=${{ env.config }} /p:TargetVsixContainer=${{ env.vsixContainer }} /p:DeployExtension=False /verbosity:minimal + + - name: Publish release to marketplace + id: publish + uses: mrluje/vs-marketplace-publisher@v2 + with: + # (Required) Personal access token to perform action on the VS Marketplace + pat: ${{ secrets.vs_pat }} + + # (Required) Path to the manifest used for the publish + manifestPath: vs-extension/vsixManifest.json + + # (Optional) Path to an extension package + vsixPath: ${{ env.vsixContainer }}