diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..e054144 --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,50 @@ +# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json +name: "Build" + +on: + push: + branches: [main] + paths-ignore: + - '*.md' + pull_request: + branches: [main] + paths-ignore: + - '*.md' + +jobs: + build: + outputs: + version: ${{ steps.vsix_version.outputs.version-number }} + name: Build + runs-on: windows-2022 + env: + Configuration: Debug + DeployExtension: False + VsixManifestPath: src\source.extension.vsixmanifest + VsixManifestSourcePath: src\source.extension.cs + + steps: + - uses: actions/checkout@v4 + + - name: Setup .NET build dependencies + uses: timheuer/bootstrap-dotnet@v2 + with: + nuget: 'false' + sdk: 'false' + msbuild: 'true' + + - name: Increment VSIX version + id: vsix_version + uses: timheuer/vsix-version-stamp@v2 + with: + manifest-file: ${{ env.VsixManifestPath }} + vsix-token-source-file: ${{ env.VsixManifestSourcePath }} + + - name: Build + run: msbuild /v:m -restore /p:OutDir=\_built ./CollapseComments.sln + + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: ${{ github.event.repository.name }}.vsix + path: /_built/**/*.vsix