Skip to content

Commit 0af4cb3

Browse files
committed
Adds CI workflow
Sets up a CI workflow to automatically build and package the project on pushes and pull requests to the main branch. The workflow includes steps for checking out code, setting up .NET, restoring dependencies, building, publishing, zipping the output, and uploading the artifact.
1 parent 434de6d commit 0af4cb3

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
2+
name: Build and Package
3+
4+
on:
5+
push:
6+
branches: [ main ]
7+
pull_request:
8+
branches: [ main ]
9+
workflow_dispatch:
10+
11+
jobs:
12+
build:
13+
runs-on: windows-latest
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v4
17+
18+
- name: Setup .NET
19+
uses: actions/setup-dotnet@v4
20+
with:
21+
dotnet-version: '9.0.x'
22+
23+
- name: Restore dependencies
24+
run: dotnet restore src/TerminalBackgroundRotator.csproj
25+
26+
- name: Build
27+
run: dotnet build src/TerminalBackgroundRotator.csproj --configuration Release --no-restore
28+
29+
- name: Publish
30+
run: dotnet publish src/TerminalBackgroundRotator.csproj --configuration Release --output publish --no-restore
31+
32+
- name: Upload artifact
33+
uses: actions/upload-artifact@v4
34+
with:
35+
name: TerminalBackgroundRotator
36+
path: publish

0 commit comments

Comments
 (0)