Skip to content

Commit 3df3b3d

Browse files
added CI
1 parent eb08e9b commit 3df3b3d

1 file changed

Lines changed: 53 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: CI
2+
3+
# When to run this workflow
4+
on:
5+
push:
6+
branches: [ master, develop ]
7+
pull_request:
8+
branches: [ master ]
9+
10+
jobs:
11+
build:
12+
name: Build and Test
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
# Step 1: Get your code
17+
- name: 📥 Checkout repository
18+
uses: actions/checkout@v4
19+
20+
# Step 2: Install .NET 10
21+
- name: ⚙️ Setup .NET
22+
uses: actions/setup-dotnet@v4
23+
with:
24+
dotnet-version: '10.0.x'
25+
26+
# Step 3: Show .NET version (for debugging)
27+
- name: 📊 Display .NET version
28+
run: dotnet --version
29+
30+
# Step 4: Restore NuGet packages
31+
- name: 📦 Restore dependencies
32+
run: dotnet restore
33+
34+
# Step 5: Build the solution
35+
- name: 🔨 Build solution
36+
run: dotnet build --configuration Release --no-restore
37+
38+
# Step 6: Run tests (commented out since you don't have tests yet)
39+
# Uncomment this when you add test projects
40+
# - name: 🧪 Run tests
41+
# run: dotnet test --configuration Release --no-build --verbosity normal
42+
43+
# Step 7: Publish the API
44+
- name: 📤 Publish API
45+
run: dotnet publish Taskify.Api/Taskify.Api.csproj --configuration Release --no-build --output ./publish
46+
47+
# Step 8: Upload build artifacts
48+
- name: 💾 Upload artifact
49+
uses: actions/upload-artifact@v4
50+
with:
51+
name: taskify-api-build
52+
path: ./publish
53+
retention-days: 7

0 commit comments

Comments
 (0)