Skip to content

Commit 07e1bb5

Browse files
committed
chore: add CI workflow and global.json for .NET SDK configuration. Set up continuous integration to build, test, and package ShellDocs CLI.
1 parent e9bca15 commit 07e1bb5

2 files changed

Lines changed: 44 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
workflow_dispatch:
9+
10+
jobs:
11+
build-test:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Setup .NET
17+
uses: actions/setup-dotnet@v4
18+
with:
19+
global-json-file: global.json
20+
21+
- name: Restore
22+
run: dotnet restore shelldocs.slnx
23+
24+
- name: Build
25+
run: dotnet build shelldocs.slnx --configuration Release --no-restore
26+
27+
- name: Test
28+
run: dotnet test shelldocs.slnx --configuration Release --no-build --verbosity normal
29+
30+
# Smoke test: verify the CLI packs cleanly as a global tool
31+
- name: Pack CLI
32+
run: dotnet pack src/ShellDocs.CLI --configuration Release --output nupkgs
33+
34+
- name: Verify CLI installs + runs
35+
run: |
36+
dotnet tool install --global --add-source ./nupkgs ShellDocs.CLI --prerelease
37+
shelldocs --help

global.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"sdk": {
3+
"version": "10.0.301",
4+
"rollForward": "latestFeature",
5+
"allowPrerelease": false
6+
}
7+
}

0 commit comments

Comments
 (0)