Skip to content

Commit 9ba3316

Browse files
authored
ci: standardize workflows to match other VS extensions (#2)
- 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)
1 parent 2612a47 commit 9ba3316

9 files changed

Lines changed: 164 additions & 83 deletions

File tree

.commitlintrc.yml

Lines changed: 62 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,80 @@
1+
# Commitlint configuration for conventional commits
2+
# Based on: https://www.conventionalcommits.org/
3+
14
extends:
2-
- "@commitlint/config-conventional"
5+
- '@commitlint/config-conventional'
6+
37
rules:
8+
# Type enum - allowed commit types
49
type-enum:
10+
- 2 # Level: error
11+
- always
12+
- # Allowed types:
13+
- feat # New feature
14+
- fix # Bug fix
15+
- docs # Documentation only changes
16+
- style # Code style changes (formatting, missing semi-colons, etc)
17+
- refactor # Code refactoring (neither fixes a bug nor adds a feature)
18+
- perf # Performance improvements
19+
- test # Adding or updating tests
20+
- build # Changes to build system or dependencies
21+
- ci # CI/CD configuration changes
22+
- chore # Other changes that don't modify src or test files
23+
- revert # Revert a previous commit
24+
25+
# Type case should be lowercase
26+
type-case:
527
- 2
628
- always
7-
- - feat
8-
- fix
9-
- docs
10-
- style
11-
- refactor
12-
- perf
13-
- test
14-
- build
15-
- ci
16-
- chore
17-
- revert
29+
- lower-case
30+
31+
# Type must not be empty
32+
type-empty:
33+
- 2
34+
- never
35+
36+
# Scope case should be lowercase
1837
scope-case:
1938
- 2
2039
- always
2140
- lower-case
22-
subject-case:
41+
42+
# Subject must not be empty
43+
subject-empty:
2344
- 2
2445
- never
25-
- - sentence-case
26-
- start-case
27-
- pascal-case
28-
- upper-case
46+
47+
# Subject must not end with a period
2948
subject-full-stop:
3049
- 2
3150
- never
32-
- "."
51+
- '.'
52+
53+
# Disable subject-case to allow uppercase abbreviations (PR, API, CLI, etc.)
54+
subject-case:
55+
- 0
56+
57+
# Header (first line) max length
3358
header-max-length:
3459
- 2
3560
- always
61+
- 72
62+
63+
# Body should have a blank line before it
64+
body-leading-blank:
65+
- 1 # Warning level
66+
- always
67+
68+
# Footer should have a blank line before it
69+
footer-leading-blank:
70+
- 1 # Warning level
71+
- always
72+
73+
# Body max line length
74+
body-max-line-length:
75+
- 1 # Warning level
76+
- always
3677
- 100
78+
79+
# Help URL shown in error messages
80+
helpUrl: 'https://www.conventionalcommits.org/'

.github/workflows/build.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Build
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
types: [opened, reopened]
7+
paths:
8+
- 'src/**'
9+
- '*.slnx'
10+
- '.github/workflows/build.yml'
11+
push:
12+
branches:
13+
- main
14+
15+
jobs:
16+
build:
17+
uses: CodingWithCalvin/.github/.github/workflows/vsix-build.yml@main
18+
with:
19+
extension-name: LaunchyBar
20+
secrets: inherit

.github/workflows/commit-lint.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Lint PR Title
2+
3+
on:
4+
pull_request:
5+
types: [opened, edited, reopened, synchronize]
6+
7+
permissions:
8+
contents: read
9+
pull-requests: read
10+
11+
jobs:
12+
lint-pr-title:
13+
name: Lint PR Title
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v4
18+
19+
- name: Setup Node.js
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: '20'
23+
24+
- name: Install commitlint
25+
run: |
26+
npm install --save-dev @commitlint/cli@18.4.3 @commitlint/config-conventional@18.4.3
27+
28+
- name: Validate PR title
29+
env:
30+
PR_TITLE: ${{ github.event.pull_request.title }}
31+
run: |
32+
echo "Validating PR title: $PR_TITLE"
33+
echo "$PR_TITLE" | npx commitlint --verbose

.github/workflows/contributors.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Update Contributors
2+
3+
on:
4+
schedule:
5+
- cron: '0 6 * * *'
6+
workflow_dispatch:
7+
8+
jobs:
9+
contributors:
10+
uses: CodingWithCalvin/.github/.github/workflows/contributors.yml@main
11+
with:
12+
output-format: html
13+
secrets: inherit
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: Preview Changelog
2+
3+
run-name: Preview release notes for next release
4+
5+
on:
6+
workflow_dispatch:
7+
8+
jobs:
9+
preview:
10+
name: Preview
11+
uses: CodingWithCalvin/.github/.github/workflows/generate-changelog.yml@main
12+
secrets: inherit

.github/workflows/publish.yml

Lines changed: 13 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,19 @@
1-
name: Publish
1+
name: Publish to VS Marketplace
22

33
on:
4-
push:
5-
branches:
6-
- main
7-
pull_request:
8-
branches:
9-
- main
104
workflow_dispatch:
115

12-
jobs:
13-
build:
14-
runs-on: windows-latest
15-
16-
env:
17-
SolutionPath: src/CodingWithCalvin.LaunchyBar.slnx
18-
VsixPath: src/CodingWithCalvin.LaunchyBar/bin/Release/CodingWithCalvin.LaunchyBar.vsix
19-
20-
steps:
21-
- name: Checkout
22-
uses: actions/checkout@v4
23-
24-
- name: Setup .NET
25-
uses: actions/setup-dotnet@v4
26-
with:
27-
dotnet-version: 8.0.x
28-
29-
- name: Setup MSBuild
30-
uses: microsoft/setup-msbuild@v2
31-
32-
- name: Restore NuGet packages
33-
run: dotnet restore ${{ env.SolutionPath }}
34-
35-
- name: Build
36-
run: dotnet build ${{ env.SolutionPath }} --configuration Release --no-restore
37-
38-
- name: Upload VSIX artifact
39-
uses: actions/upload-artifact@v4
40-
with:
41-
name: vsix
42-
path: ${{ env.VsixPath }}
6+
permissions:
7+
contents: write
8+
actions: read
439

10+
jobs:
4411
publish:
45-
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
46-
needs: build
47-
runs-on: windows-latest
48-
49-
steps:
50-
- name: Download VSIX artifact
51-
uses: actions/download-artifact@v4
52-
with:
53-
name: vsix
54-
55-
- name: Publish to VS Marketplace
56-
uses: cezarypiatek/VssExtensionPublishAction@v1
57-
with:
58-
vsix-file: CodingWithCalvin.LaunchyBar.vsix
59-
publish-manifest-file: ${{ github.workspace }}/vs-publish.json
60-
personal-access-token: ${{ secrets.VS_MARKETPLACE_PAT }}
12+
uses: CodingWithCalvin/.github/.github/workflows/vsix-publish.yml@main
13+
with:
14+
extension-name: LaunchyBar
15+
display-name: 'LaunchyBar'
16+
marketplace-id: CodingWithCalvin.VS-LaunchyBar
17+
description: 'A narrow icon launcher bar for Visual Studio, similar to VS Code Activity Bar'
18+
hashtags: '#visualstudio #vsix #productivity'
19+
secrets: inherit

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,23 @@
1212
<a href="https://github.com/CodingWithCalvin/VS-LaunchyBar/blob/main/LICENSE">
1313
<img src="https://img.shields.io/github/license/CodingWithCalvin/VS-LaunchyBar?style=for-the-badge" alt="License">
1414
</a>
15-
<a href="https://github.com/CodingWithCalvin/VS-LaunchyBar/actions/workflows/publish.yml">
16-
<img src="https://img.shields.io/github/actions/workflow/status/CodingWithCalvin/VS-LaunchyBar/publish.yml?style=for-the-badge" alt="Build Status">
15+
<a href="https://github.com/CodingWithCalvin/VS-LaunchyBar/actions/workflows/build.yml">
16+
<img src="https://img.shields.io/github/actions/workflow/status/CodingWithCalvin/VS-LaunchyBar/build.yml?style=for-the-badge" alt="Build Status">
1717
</a>
1818
</p>
1919

2020
<p align="center">
21-
<a href="https://marketplace.visualstudio.com/items?itemName=CodingWithCalvin.LaunchyBar">
22-
<img src="https://img.shields.io/visual-studio-marketplace/v/CodingWithCalvin.LaunchyBar?style=for-the-badge" alt="Marketplace Version">
21+
<a href="https://marketplace.visualstudio.com/items?itemName=CodingWithCalvin.VS-LaunchyBar">
22+
<img src="https://img.shields.io/visual-studio-marketplace/v/CodingWithCalvin.VS-LaunchyBar?style=for-the-badge" alt="Marketplace Version">
2323
</a>
24-
<a href="https://marketplace.visualstudio.com/items?itemName=CodingWithCalvin.LaunchyBar">
25-
<img src="https://img.shields.io/visual-studio-marketplace/i/CodingWithCalvin.LaunchyBar?style=for-the-badge" alt="Installs">
24+
<a href="https://marketplace.visualstudio.com/items?itemName=CodingWithCalvin.VS-LaunchyBar">
25+
<img src="https://img.shields.io/visual-studio-marketplace/i/CodingWithCalvin.VS-LaunchyBar?style=for-the-badge" alt="Installs">
2626
</a>
27-
<a href="https://marketplace.visualstudio.com/items?itemName=CodingWithCalvin.LaunchyBar">
28-
<img src="https://img.shields.io/visual-studio-marketplace/d/CodingWithCalvin.LaunchyBar?style=for-the-badge" alt="Downloads">
27+
<a href="https://marketplace.visualstudio.com/items?itemName=CodingWithCalvin.VS-LaunchyBar">
28+
<img src="https://img.shields.io/visual-studio-marketplace/d/CodingWithCalvin.VS-LaunchyBar?style=for-the-badge" alt="Downloads">
2929
</a>
30-
<a href="https://marketplace.visualstudio.com/items?itemName=CodingWithCalvin.LaunchyBar">
31-
<img src="https://img.shields.io/visual-studio-marketplace/r/CodingWithCalvin.LaunchyBar?style=for-the-badge" alt="Rating">
30+
<a href="https://marketplace.visualstudio.com/items?itemName=CodingWithCalvin.VS-LaunchyBar">
31+
<img src="https://img.shields.io/visual-studio-marketplace/r/CodingWithCalvin.VS-LaunchyBar?style=for-the-badge" alt="Rating">
3232
</a>
3333
</p>
3434

@@ -95,7 +95,7 @@ Contributions are welcome! Please feel free to submit a Pull Request.
9595
```
9696
git clone https://github.com/CodingWithCalvin/VS-LaunchyBar.git
9797
```
98-
2. Open `src/CodingWithCalvin.LaunchyBar.slnx` in Visual Studio 2022
98+
2. Open `src/CodingWithCalvin.VS-LaunchyBar.slnx` in Visual Studio 2022
9999
3. Build the solution (`Ctrl+Shift+B`)
100100
4. Press `F5` to launch the experimental instance
101101
5. Make your changes and submit a PR

resources/CommandIcon.png

-187 Bytes
Binary file not shown.

resources/preview.png

-505 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)