Skip to content

Commit d4369a9

Browse files
committed
ci: use shared workflows from .github organization
- Update build workflow to use vsix-build.yml - Update publish workflow to use vsix-publish.yml - Update contributors workflow to use shared contributors.yml
1 parent af05154 commit d4369a9

3 files changed

Lines changed: 35 additions & 95 deletions

File tree

.github/workflows/build.yml

Lines changed: 17 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,24 @@
11
name: Build
22

33
on:
4-
push:
5-
branches: [main]
6-
pull_request:
7-
branches: [main]
84
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+
paths:
15+
- 'src/**'
16+
- '*.slnx'
17+
- '.github/workflows/build.yml'
918

1019
jobs:
1120
build:
12-
runs-on: windows-latest
13-
14-
steps:
15-
- name: Checkout
16-
uses: actions/checkout@v4
17-
18-
- name: Setup .NET
19-
uses: actions/setup-dotnet@v4
20-
with:
21-
dotnet-version: 8.0.x
22-
23-
- name: Restore dependencies
24-
run: dotnet restore src/CodingWithCalvin.Debugalizers.slnx
25-
26-
- name: Build
27-
run: dotnet build src/CodingWithCalvin.Debugalizers.slnx --configuration Release --no-restore
28-
29-
- name: Test
30-
run: dotnet test src/CodingWithCalvin.Debugalizers.slnx --configuration Release --no-build --verbosity normal
31-
32-
- name: Upload VSIX artifact
33-
uses: actions/upload-artifact@v4
34-
with:
35-
name: vsix
36-
path: src/CodingWithCalvin.Debugalizers/bin/Release/**/*.vsix
37-
if-no-files-found: warn
21+
uses: CodingWithCalvin/.github/.github/workflows/vsix-build.yml@main
22+
with:
23+
extension-name: Debugalizers
24+
secrets: inherit

.github/workflows/contributors.yml

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,11 @@
1-
name: Contributors
1+
name: Update Contributors
22

33
on:
4-
push:
5-
branches: [main]
4+
schedule:
5+
- cron: '0 0 * * *'
66
workflow_dispatch:
77

88
jobs:
99
contributors:
10-
runs-on: ubuntu-latest
11-
steps:
12-
- name: Checkout
13-
uses: actions/checkout@v4
14-
15-
- name: Update contributors
16-
uses: akhilmhdh/contributors-readme-action@v2.3.10
17-
env:
18-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19-
with:
20-
image_size: 100
21-
columns_per_row: 6
22-
readme_path: README.md
23-
collaborators: all
24-
commit_message: 'docs: update contributors'
10+
uses: CodingWithCalvin/.github/.github/workflows/contributors.yml@main
11+
secrets: inherit

.github/workflows/publish.yml

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

33
on:
4-
release:
5-
types: [published]
64
workflow_dispatch:
7-
inputs:
8-
version:
9-
description: 'Version to publish'
10-
required: true
11-
type: string
5+
6+
permissions:
7+
contents: write
8+
actions: read
129

1310
jobs:
1411
publish:
15-
runs-on: windows-latest
16-
17-
steps:
18-
- name: Checkout
19-
uses: actions/checkout@v4
20-
21-
- name: Setup .NET
22-
uses: actions/setup-dotnet@v4
23-
with:
24-
dotnet-version: 8.0.x
25-
26-
- name: Restore dependencies
27-
run: dotnet restore src/CodingWithCalvin.Debugalizers.slnx
28-
29-
- name: Build Release
30-
run: dotnet build src/CodingWithCalvin.Debugalizers.slnx --configuration Release --no-restore
31-
32-
- name: Test
33-
run: dotnet test src/CodingWithCalvin.Debugalizers.slnx --configuration Release --no-build --verbosity normal
34-
35-
- name: Upload to VS Marketplace
36-
env:
37-
VS_MARKETPLACE_PAT: ${{ secrets.VS_MARKETPLACE_PAT }}
38-
run: |
39-
$vsixPath = Get-ChildItem -Path "src/CodingWithCalvin.Debugalizers/bin/Release" -Filter "*.vsix" -Recurse | Select-Object -First 1 -ExpandProperty FullName
40-
if ($vsixPath) {
41-
Write-Host "Found VSIX: $vsixPath"
42-
# Note: Actual publishing would use VsixPublisher.exe or similar
43-
# This is a placeholder for the actual marketplace publishing step
44-
} else {
45-
Write-Error "No VSIX file found"
46-
exit 1
47-
}
48-
49-
- name: Upload VSIX to Release
50-
if: github.event_name == 'release'
51-
uses: softprops/action-gh-release@v1
52-
with:
53-
files: src/CodingWithCalvin.Debugalizers/bin/Release/**/*.vsix
12+
uses: CodingWithCalvin/.github/.github/workflows/vsix-publish.yml@main
13+
with:
14+
extension-name: Debugalizers
15+
display-name: 'Debugalizers'
16+
marketplace-id: CodingWithCalvin.VS-Debugalizers
17+
description: 'A powerful collection of debug visualizers for Visual Studio'
18+
hashtags: '#debugger #visualizer'
19+
secrets: inherit

0 commit comments

Comments
 (0)