From 3d6fe8820dc8d1851bcbaab95c681ee9c8b1621b Mon Sep 17 00:00:00 2001 From: reduckted Date: Tue, 29 Jul 2025 20:52:46 +1000 Subject: [PATCH] Added workflow to manually publish the extension. --- .editorconfig | 29 ++++++++++++----------- .github/workflows/ci.yml | 32 +++++++++++++------------- .github/workflows/publish-manually.yml | 32 ++++++++++++++++++++++++++ .github/workflows/publish.yml | 28 +++++++++++----------- 4 files changed, 78 insertions(+), 43 deletions(-) create mode 100644 .github/workflows/publish-manually.yml diff --git a/.editorconfig b/.editorconfig index 8d66e0a..6140ae4 100644 --- a/.editorconfig +++ b/.editorconfig @@ -8,6 +8,9 @@ charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true +[*.yml] +indent_size = 2 + # C# files [*.cs] @@ -198,11 +201,11 @@ dotnet_naming_rule.private_field_should_be_begins_with__.style = begins_with__ dotnet_naming_symbols.interface.applicable_kinds = interface dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected -dotnet_naming_symbols.interface.required_modifiers = +dotnet_naming_symbols.interface.required_modifiers = dotnet_naming_symbols.non_private_field.applicable_kinds = field dotnet_naming_symbols.non_private_field.applicable_accessibilities = public, internal, protected, protected_internal, private_protected -dotnet_naming_symbols.non_private_field.required_modifiers = +dotnet_naming_symbols.non_private_field.required_modifiers = dotnet_naming_symbols.static_readonly_field.applicable_kinds = field dotnet_naming_symbols.static_readonly_field.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected @@ -210,15 +213,15 @@ dotnet_naming_symbols.static_readonly_field.required_modifiers = readonly, stati dotnet_naming_symbols.private_field.applicable_kinds = field dotnet_naming_symbols.private_field.applicable_accessibilities = private, private_protected -dotnet_naming_symbols.private_field.required_modifiers = +dotnet_naming_symbols.private_field.required_modifiers = dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum, delegate dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected -dotnet_naming_symbols.types.required_modifiers = +dotnet_naming_symbols.types.required_modifiers = dotnet_naming_symbols.non_field_member.applicable_kinds = property, event, method dotnet_naming_symbols.non_field_member.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected -dotnet_naming_symbols.non_field_member.required_modifiers = +dotnet_naming_symbols.non_field_member.required_modifiers = dotnet_naming_symbols.constant.applicable_kinds = field dotnet_naming_symbols.constant.applicable_accessibilities = * @@ -226,23 +229,23 @@ dotnet_naming_symbols.constant.required_modifiers = const # Naming styles -dotnet_naming_style.pascal_case.required_prefix = -dotnet_naming_style.pascal_case.required_suffix = -dotnet_naming_style.pascal_case.word_separator = +dotnet_naming_style.pascal_case.required_prefix = +dotnet_naming_style.pascal_case.required_suffix = +dotnet_naming_style.pascal_case.word_separator = dotnet_naming_style.pascal_case.capitalization = pascal_case dotnet_naming_style.begins_with_i.required_prefix = I -dotnet_naming_style.begins_with_i.required_suffix = -dotnet_naming_style.begins_with_i.word_separator = +dotnet_naming_style.begins_with_i.required_suffix = +dotnet_naming_style.begins_with_i.word_separator = dotnet_naming_style.begins_with_i.capitalization = pascal_case dotnet_naming_style.begins_with__.required_prefix = _ -dotnet_naming_style.begins_with__.required_suffix = -dotnet_naming_style.begins_with__.word_separator = +dotnet_naming_style.begins_with__.required_suffix = +dotnet_naming_style.begins_with__.word_separator = dotnet_naming_style.begins_with__.capitalization = camel_case #### .NET Code Analysis #### dotnet_diagnostic.CA1014.severity = none dotnet_diagnostic.CA2007.severity = none -dotnet_diagnostic.IDE0070.severity = none \ No newline at end of file +dotnet_diagnostic.IDE0070.severity = none diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 007d58f..054e0b8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,26 +1,26 @@ name: Continuous Integration on: - pull_request: - types: [opened, synchronize, edited] + pull_request: + types: [opened, synchronize, edited] jobs: - build: - runs-on: windows-2022 + build: + runs-on: windows-2022 - env: - Configuration: Release - DeployExtension: false + env: + Configuration: Release + DeployExtension: false - steps: - - name: Checkout - uses: actions/checkout@v4 + steps: + - name: Checkout + uses: actions/checkout@v4 - - name: Setup .NET SDK - uses: actions/setup-dotnet@v4 + - name: Setup .NET SDK + uses: actions/setup-dotnet@v4 - - name: Build - run: dotnet build + - name: Build + run: dotnet build - - name: Test - run: dotnet test tests/ProjectFilter.UnitTests + - name: Test + run: dotnet test tests/ProjectFilter.UnitTests diff --git a/.github/workflows/publish-manually.yml b/.github/workflows/publish-manually.yml new file mode 100644 index 0000000..14f9440 --- /dev/null +++ b/.github/workflows/publish-manually.yml @@ -0,0 +1,32 @@ +name: Publish Extension Manually + +on: + workflow_dispatch: + inputs: + version: + description: "Tag to publish" + required: true + +jobs: + publish: + runs-on: windows-2022 + + env: + Configuration: Release + DeployExtension: false + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + ref: ${{ github.event.inputs.version }} + + - name: Setup MSBuild + uses: microsoft/setup-msbuild@v2 + + - name: Publish + run: msbuild source/ProjectFilter/ProjectFilter.csproj /t:PublishToMarketplace /Restore /v:Minimal /p:BuildBeforePublish=true /p:PersonalAccessToken=${{ secrets.PUBLISHER_TOKEN }} + env: + # This workflow should be used when the `VsixPublisher` from the `Microsoft.VSSDK.BuildTools` + # package fails, so we'll use the `VsixPublisher` that is installed with Visual Studio. + VsixPublisher: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VSSDK\\VisualStudioIntegration\\Tools\\Bin\\VsixPublisher.exe" diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 6973e81..80472f3 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,23 +1,23 @@ name: Publish Extension on: - release: - types: [published] + release: + types: [published] jobs: - publish: - runs-on: windows-2022 + publish: + runs-on: windows-2022 - env: - Configuration: Release - DeployExtension: false + env: + Configuration: Release + DeployExtension: false - steps: - - name: Checkout - uses: actions/checkout@v2 + steps: + - name: Checkout + uses: actions/checkout@v2 - - name: Setup MSBuild - uses: microsoft/setup-msbuild@v1.0.2 + - name: Setup MSBuild + uses: microsoft/setup-msbuild@v1.0.2 - - name: Publish - run: msbuild source/ProjectFilter/ProjectFilter.csproj /t:PublishToMarketplace /Restore /v:Minimal /p:BuildBeforePublish=true /p:PersonalAccessToken=${{ secrets.PUBLISHER_TOKEN }} + - name: Publish + run: msbuild source/ProjectFilter/ProjectFilter.csproj /t:PublishToMarketplace /Restore /v:Minimal /p:BuildBeforePublish=true /p:PersonalAccessToken=${{ secrets.PUBLISHER_TOKEN }}