-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (33 loc) · 1.07 KB
/
dotnet.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: .NET CI/CD Pipeline
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up .NET SDK (for .NET 9.0)
uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0.x' # Setup .NET 9.0
- name: Restore dependencies for .NET 9.0
run: dotnet restore src/Mappy/Mappy.csproj
- name: Build Project for .NET 9.0
run: dotnet build src/Mappy/Mappy.csproj
- name: Pack the project as a NuGet package for .NET 9.0
run: dotnet pack src/Mappy/Mappy.csproj -c Release -o artifacts
- name: Publish Artifacts
uses: actions/upload-artifact@v4
with:
name: build-artifacts
path: src/Mappy/bin/Release/net9.0
if-no-files-found: warn
include-hidden-files: false
#- name: Publish to GitHub Packages
# env:
# NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
# run: |
# dotnet nuget push artifacts/*.nupkg --source $NUGET --api-key $NUGET_API_KEY