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 : Build .NET 8 Lambda
2+
3+ on :
4+ push :
5+ branches : main
6+ pull_request :
7+ branches : main
8+ workflow_dispatch :
9+
10+ jobs :
11+ build :
12+ runs-on : ubuntu-latest
13+
14+ steps :
15+ - name : Checkout code
16+ uses : actions/checkout@v4
17+
18+ - name : Setup .NET 8
19+ uses : actions/setup-dotnet@v4
20+ with :
21+ dotnet-version : ' 8.0.x'
22+
23+ - name : Cache NuGet packages
24+ uses : actions/cache@v4
25+ with :
26+ path : ~/.nuget/packages
27+ key : ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}
28+ restore-keys : |
29+ ${{ runner.os }}-nuget-
30+
31+ - name : Restore dependencies
32+ run : dotnet restore
33+
34+ - name : Build
35+ run : dotnet build --no-restore --configuration Release
36+
37+ - name : Package Lambda function
38+ run : dotnet lambda package --configuration Release
39+
40+ - name : Upload build artifacts
41+ uses : actions/upload-artifact@v4
42+ with :
43+ name : lambda-package
44+ path : ' **/bin/Release/net8.0/publish/*.zip'
45+ retention-days : 30
You can’t perform that action at this time.
0 commit comments