From 2f5adb20e48989ff93d57f19dfc4202f0683798c Mon Sep 17 00:00:00 2001 From: mcbride-clint Date: Fri, 11 Jun 2021 13:44:34 -0400 Subject: [PATCH 1/5] Create dotnet.yml --- .github/workflows/dotnet.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/dotnet.yml diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml new file mode 100644 index 0000000..0bfd7d1 --- /dev/null +++ b/.github/workflows/dotnet.yml @@ -0,0 +1,23 @@ +name: .NET + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Setup .NET + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 5.0.x + - name: Restore dependencies + run: dotnet restore + - name: Build + run: dotnet build --no-restore From ba76f0367dbd125ac65219a0ee1dd6427da42f15 Mon Sep 17 00:00:00 2001 From: mcbride-clint Date: Fri, 11 Jun 2021 13:47:23 -0400 Subject: [PATCH 2/5] Update dotnet.yml --- .github/workflows/dotnet.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 0bfd7d1..c897d0e 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -17,7 +17,7 @@ jobs: uses: actions/setup-dotnet@v1 with: dotnet-version: 5.0.x - - name: Restore dependencies - run: dotnet restore + - name: visual Restore dependencies + run: dotnet "visual-studio-template\RazorComponentCodeBehind\RazorComponentCodeBehind.sln" restore - name: Build - run: dotnet build --no-restore + run: dotnet "visual-studio-template\RazorComponentCodeBehind\RazorComponentCodeBehind.sln" build --no-restore From 7aa1ffa3f1aae4649ba5921859ada5fcc54fc952 Mon Sep 17 00:00:00 2001 From: mcbride-clint Date: Fri, 11 Jun 2021 13:50:54 -0400 Subject: [PATCH 3/5] Update dotnet.yml --- .github/workflows/dotnet.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index c897d0e..21083f9 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -18,6 +18,6 @@ jobs: with: dotnet-version: 5.0.x - name: visual Restore dependencies - run: dotnet "visual-studio-template\RazorComponentCodeBehind\RazorComponentCodeBehind.sln" restore + run: dotnet restore "visual-studio-template\RazorComponentCodeBehind\RazorComponentCodeBehind.sln" - name: Build - run: dotnet "visual-studio-template\RazorComponentCodeBehind\RazorComponentCodeBehind.sln" build --no-restore + run: dotnet build "visual-studio-template\RazorComponentCodeBehind\RazorComponentCodeBehind.sln" --no-restore From 08021a1404deae12b012d042b621deff29c9b5a9 Mon Sep 17 00:00:00 2001 From: mcbride-clint Date: Fri, 11 Jun 2021 13:52:54 -0400 Subject: [PATCH 4/5] Update dotnet.yml --- .github/workflows/dotnet.yml | 56 +++++++++++++++++++++++++----------- 1 file changed, 40 insertions(+), 16 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 21083f9..432c12f 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -1,23 +1,47 @@ -name: .NET +name: Publish to VS Marketplace + +env: + config: Release + solution: vs-extension.sln + vsixContainer: ${{ github.workspace }}\vs-extension.vsix on: push: - branches: [ master ] - pull_request: - branches: [ master ] + branches: + - master jobs: - build: + publish: + runs-on: windows-latest + steps: + - name: Checkout + uses: actions/checkout@v2 - runs-on: ubuntu-latest + - name: Add MSBuild to PATH + uses: microsoft/setup-msbuild@v1.0.0 + - uses: nuget/setup-nuget@v1 + with: + nuget-version: "5.x" - steps: - - uses: actions/checkout@v2 - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 5.0.x - - name: visual Restore dependencies - run: dotnet restore "visual-studio-template\RazorComponentCodeBehind\RazorComponentCodeBehind.sln" - - name: Build - run: dotnet build "visual-studio-template\RazorComponentCodeBehind\RazorComponentCodeBehind.sln" --no-restore + - 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 }} From 051d705fb1c52a50ae3c561a80128a974b936dc7 Mon Sep 17 00:00:00 2001 From: mcbride-clint Date: Fri, 11 Jun 2021 13:53:31 -0400 Subject: [PATCH 5/5] Update dotnet.yml