From f4cdfa4c95b932db768fdd8211ac9ff71c387b33 Mon Sep 17 00:00:00 2001 From: "Calvin A. Allen" Date: Wed, 4 Feb 2026 12:37:37 -0500 Subject: [PATCH] ci: standardize workflows to match other VS extensions - Replace custom publish.yml with reusable workflow from .github org - Add build.yml using reusable vsix-build workflow - Add commit-lint.yml for PR title validation - Add contributors.yml for auto-updating contributors - Add preview-changelog.yml for release notes preview - Update .commitlintrc.yml with standard configuration - Fix README marketplace links to use VS-LaunchyBar ID - Fix build status badge to point to build.yml - Remove unused resource files (CommandIcon.png, preview.png) --- .commitlintrc.yml | 80 ++++++++++++++++++------ .github/workflows/build.yml | 20 ++++++ .github/workflows/commit-lint.yml | 33 ++++++++++ .github/workflows/contributors.yml | 13 ++++ .github/workflows/preview-changelog.yml | 12 ++++ .github/workflows/publish.yml | 67 ++++---------------- README.md | 22 +++---- resources/CommandIcon.png | Bin 187 -> 0 bytes resources/preview.png | Bin 505 -> 0 bytes 9 files changed, 164 insertions(+), 83 deletions(-) create mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/commit-lint.yml create mode 100644 .github/workflows/contributors.yml create mode 100644 .github/workflows/preview-changelog.yml delete mode 100644 resources/CommandIcon.png delete mode 100644 resources/preview.png diff --git a/.commitlintrc.yml b/.commitlintrc.yml index 5bcbad6..9d61732 100644 --- a/.commitlintrc.yml +++ b/.commitlintrc.yml @@ -1,36 +1,80 @@ +# Commitlint configuration for conventional commits +# Based on: https://www.conventionalcommits.org/ + extends: - - "@commitlint/config-conventional" + - '@commitlint/config-conventional' + rules: + # Type enum - allowed commit types type-enum: + - 2 # Level: error + - always + - # Allowed types: + - feat # New feature + - fix # Bug fix + - docs # Documentation only changes + - style # Code style changes (formatting, missing semi-colons, etc) + - refactor # Code refactoring (neither fixes a bug nor adds a feature) + - perf # Performance improvements + - test # Adding or updating tests + - build # Changes to build system or dependencies + - ci # CI/CD configuration changes + - chore # Other changes that don't modify src or test files + - revert # Revert a previous commit + + # Type case should be lowercase + type-case: - 2 - always - - - feat - - fix - - docs - - style - - refactor - - perf - - test - - build - - ci - - chore - - revert + - lower-case + + # Type must not be empty + type-empty: + - 2 + - never + + # Scope case should be lowercase scope-case: - 2 - always - lower-case - subject-case: + + # Subject must not be empty + subject-empty: - 2 - never - - - sentence-case - - start-case - - pascal-case - - upper-case + + # Subject must not end with a period subject-full-stop: - 2 - never - - "." + - '.' + + # Disable subject-case to allow uppercase abbreviations (PR, API, CLI, etc.) + subject-case: + - 0 + + # Header (first line) max length header-max-length: - 2 - always + - 72 + + # Body should have a blank line before it + body-leading-blank: + - 1 # Warning level + - always + + # Footer should have a blank line before it + footer-leading-blank: + - 1 # Warning level + - always + + # Body max line length + body-max-line-length: + - 1 # Warning level + - always - 100 + +# Help URL shown in error messages +helpUrl: 'https://www.conventionalcommits.org/' diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..10035ae --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,20 @@ +name: Build + +on: + workflow_dispatch: + pull_request: + types: [opened, reopened] + paths: + - 'src/**' + - '*.slnx' + - '.github/workflows/build.yml' + push: + branches: + - main + +jobs: + build: + uses: CodingWithCalvin/.github/.github/workflows/vsix-build.yml@main + with: + extension-name: LaunchyBar + secrets: inherit diff --git a/.github/workflows/commit-lint.yml b/.github/workflows/commit-lint.yml new file mode 100644 index 0000000..db3deee --- /dev/null +++ b/.github/workflows/commit-lint.yml @@ -0,0 +1,33 @@ +name: Lint PR Title + +on: + pull_request: + types: [opened, edited, reopened, synchronize] + +permissions: + contents: read + pull-requests: read + +jobs: + lint-pr-title: + name: Lint PR Title + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + + - name: Install commitlint + run: | + npm install --save-dev @commitlint/cli@18.4.3 @commitlint/config-conventional@18.4.3 + + - name: Validate PR title + env: + PR_TITLE: ${{ github.event.pull_request.title }} + run: | + echo "Validating PR title: $PR_TITLE" + echo "$PR_TITLE" | npx commitlint --verbose diff --git a/.github/workflows/contributors.yml b/.github/workflows/contributors.yml new file mode 100644 index 0000000..daf757f --- /dev/null +++ b/.github/workflows/contributors.yml @@ -0,0 +1,13 @@ +name: Update Contributors + +on: + schedule: + - cron: '0 6 * * *' + workflow_dispatch: + +jobs: + contributors: + uses: CodingWithCalvin/.github/.github/workflows/contributors.yml@main + with: + output-format: html + secrets: inherit diff --git a/.github/workflows/preview-changelog.yml b/.github/workflows/preview-changelog.yml new file mode 100644 index 0000000..ca8d17c --- /dev/null +++ b/.github/workflows/preview-changelog.yml @@ -0,0 +1,12 @@ +name: Preview Changelog + +run-name: Preview release notes for next release + +on: + workflow_dispatch: + +jobs: + preview: + name: Preview + uses: CodingWithCalvin/.github/.github/workflows/generate-changelog.yml@main + secrets: inherit diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index c0f87e3..c273093 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,60 +1,19 @@ -name: Publish +name: Publish to VS Marketplace on: - push: - branches: - - main - pull_request: - branches: - - main workflow_dispatch: -jobs: - build: - runs-on: windows-latest - - env: - SolutionPath: src/CodingWithCalvin.LaunchyBar.slnx - VsixPath: src/CodingWithCalvin.LaunchyBar/bin/Release/CodingWithCalvin.LaunchyBar.vsix - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Setup .NET - uses: actions/setup-dotnet@v4 - with: - dotnet-version: 8.0.x - - - name: Setup MSBuild - uses: microsoft/setup-msbuild@v2 - - - name: Restore NuGet packages - run: dotnet restore ${{ env.SolutionPath }} - - - name: Build - run: dotnet build ${{ env.SolutionPath }} --configuration Release --no-restore - - - name: Upload VSIX artifact - uses: actions/upload-artifact@v4 - with: - name: vsix - path: ${{ env.VsixPath }} +permissions: + contents: write + actions: read +jobs: publish: - if: github.ref == 'refs/heads/main' && github.event_name == 'push' - needs: build - runs-on: windows-latest - - steps: - - name: Download VSIX artifact - uses: actions/download-artifact@v4 - with: - name: vsix - - - name: Publish to VS Marketplace - uses: cezarypiatek/VssExtensionPublishAction@v1 - with: - vsix-file: CodingWithCalvin.LaunchyBar.vsix - publish-manifest-file: ${{ github.workspace }}/vs-publish.json - personal-access-token: ${{ secrets.VS_MARKETPLACE_PAT }} + uses: CodingWithCalvin/.github/.github/workflows/vsix-publish.yml@main + with: + extension-name: LaunchyBar + display-name: 'LaunchyBar' + marketplace-id: CodingWithCalvin.VS-LaunchyBar + description: 'A narrow icon launcher bar for Visual Studio, similar to VS Code Activity Bar' + hashtags: '#visualstudio #vsix #productivity' + secrets: inherit diff --git a/README.md b/README.md index 840c632..635ca80 100644 --- a/README.md +++ b/README.md @@ -12,23 +12,23 @@ License - - Build Status + + Build Status

- - Marketplace Version + + Marketplace Version - - Installs + + Installs - - Downloads + + Downloads - - Rating + + Rating

@@ -95,7 +95,7 @@ Contributions are welcome! Please feel free to submit a Pull Request. ``` git clone https://github.com/CodingWithCalvin/VS-LaunchyBar.git ``` -2. Open `src/CodingWithCalvin.LaunchyBar.slnx` in Visual Studio 2022 +2. Open `src/CodingWithCalvin.VS-LaunchyBar.slnx` in Visual Studio 2022 3. Build the solution (`Ctrl+Shift+B`) 4. Press `F5` to launch the experimental instance 5. Make your changes and submit a PR diff --git a/resources/CommandIcon.png b/resources/CommandIcon.png deleted file mode 100644 index eab7fcfdc6236b0254e4a15a16800b13cbd4e89a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 187 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Ea{HEjtmSN`?>!lvI6;>1s;*b z3=DjSK$uZf!>a)(C{f}XQ4*Y=R#Ki=l*&+$n3-3imzP?iV4`QJXZF{R^94|ixu=U` zh=qT$1nc4ik)EbN11>klSjPWAU>v|~5WvkNWo{54jY8I$_cS%KG06O4VdZ80$pbWm N!PC{xWt~$(69Cd}E{*^I diff --git a/resources/preview.png b/resources/preview.png deleted file mode 100644 index eaa357fb121e6b17f0a3b59c38af83d397afe63d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 505 zcmeAS@N?(olHy`uVBq!ia0vp^4Is?H1|$#LC7uRSEa{HEjtmSN`?>!lvI6;>1s;*b z3=DjSK$uZf!>a)(C{f}XQ4*Y=R#Ki=l*&+$n3-3imzP?iV4`QJXZF{R^92I~BZH@l zV@O5Z+e?mu3