-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (62 loc) · 2.5 KB
/
nuget.yaml
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: "Deploy to NuGet"
on:
push:
tags:
- "v*"
env:
nuget: "https://api.nuget.org/v3/index.json"
project_name: SarcLibrary
authors: ArchLeaders
description: |-
Modern SEAD/SEPD archive reader written in managed C#
readme: ./Readme.md
icon: ./Icon.png
repo: https://github.com/EPD-Libraries/SarcLibrary
spdx: AGPL-3.0-or-later
tags: sarc;archive;zeldamods;message-studio;totk;botw
jobs:
deploy:
name: Deploy to NuGet
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: "8.0.x"
- name: Restore
shell: bash
run: |-
dotnet restore src/${{ env.project_name }}/${{ env.project_name }}.csproj
- name: Build
shell: bash
run: |-
dotnet build src/${{ env.project_name }}/${{ env.project_name }}.csproj \
--no-restore \
-c Release \
- name: Fetch Version
id: version
uses: battila7/get-version-action@v2
- name: Package
shell: bash
run: |
dotnet pack src/${{ env.project_name }}/${{ env.project_name }}.csproj \
--no-restore \
-c Release \
-o ./build-output/ \
-p:Authors="${{ env.authors }}" \
-p:Description="${{ env.description }}" \
-p:PackageLicenseExpression="${{ env.spdx }}" \
-p:PackageProjectUrl="${{ env.repo }}" \
-p:PackageReadmeFile="${{ env.readme }}" \
-p:PackageIcon="${{ env.icon }}" \
-p:PackageTags='"${{ env.tags }}"' \
-p:PackageVersion="${{ steps.version.outputs.version-without-v }}" \
-p:RepositoryUrl="${{ env.repo }}" \
- name: Push
shell: bash
run: |-
dotnet nuget push ./build-output/*.nupkg \
-k ${{ secrets.NUGET_AUTH }} \
-s ${{ env.nuget }} \