File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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
You can’t perform that action at this time.
0 commit comments