-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (28 loc) · 1.05 KB
/
teslacode.common.nuget.yml
File metadata and controls
36 lines (28 loc) · 1.05 KB
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
name: Deploy teslacode Common NuGet
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: '10.x'
- name: Setup .NET (use global.json)
uses: actions/setup-dotnet@v4
- name: Restore dependencies
run: dotnet restore **/Teslacode.Common/CodeChavez.Common.csproj --configfile nuget.config --no-cache
- name: Build project
run: dotnet build **/Teslacode.Common/CodeChavez.Common.csproj --configuration Release
- name: Package Common
run: dotnet pack **/Teslacode.Common/CodeChavez.Common.csproj --configuration Release --no-build --output ./artifacts
- name: Push NuGet package
run: dotnet nuget push "./artifacts/*.nupkg" --api-key $NUGET_AUTH_TOKEN --source https://api.nuget.org/v3/index.json
env:
NUGET_AUTH_TOKEN: ${{ secrets.NUGET_API_KEY }}