Repository navigation
99 lines (89 loc) · 3.81 KB
/
Copy pathnuget.yml
File metadata and controls
99 lines (89 loc) · 3.81 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
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
name: Deploy to NuGet
on:
push:
tags:
- "v*"
env:
nuget: "https://api.nuget.org/v3/index.json"
jobs:
deploy:
name: Deploy to NuGet
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
package:
- project: TkSharp
authors: ArchLeaders
description: Utility library for mod merging and management.
readme: ./Readme.md
icon: ./Icon.png
repo: https://github.com/TKMM-Team/TkSharp
spdx: MIT
tags: totk;zelda;zeldamods
- project: TkSharp.Core
authors: ArchLeaders
description: Utility library for mod merging and management.
readme: ./Readme.md
icon: ./Icon.png
repo: https://github.com/TKMM-Team/TkSharp
spdx: MIT
tags: totk;zelda;zeldamods
- project: TkSharp.Data.Embedded
authors: ArchLeaders
description: Utility library for mod merging and management.
readme: ./Readme.md
icon: ./Icon.png
repo: https://github.com/TKMM-Team/TkSharp
spdx: MIT
tags: totk;zelda;zeldamods
- project: TkSharp.Merging
authors: ArchLeaders
description: Utility library for mod merging and management.
readme: ./Readme.md
icon: ./Icon.png
repo: https://github.com/TKMM-Team/TkSharp
spdx: MIT
tags: totk;zelda;zeldamods
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: "9.x.x"
- name: Restore
shell: bash
run: |-
dotnet restore ${{ matrix.package.project }}/${{ matrix.package.project }}.csproj
- name: Build
shell: bash
run: |-
dotnet build src/${{ matrix.package.project }}/${{ matrix.package.project }}.csproj \
--no-restore \
-c Release \
- name: Fetch Version
id: version
uses: battila7/get-version-action@v2
- name: Package
shell: bash
run: |
dotnet pack src/${{ matrix.package.project }}/${{ matrix.package.project }}.csproj \
--no-restore \
-c Release \
-o ./build-output/ \
-p:Authors="${{ matrix.package.author }}" \
-p:Description="${{ matrix.package.description }}" \
-p:PackageLicenseExpression="${{ matrix.package.spdx }}" \
-p:PackageProjectUrl="${{ matrix.package.repo }}" \
-p:PackageReadmeFile="${{ matrix.package.readme }}" \
-p:PackageIcon="${{ matrix.package.icon }}" \
-p:PackageTags='"${{ matrix.package.tags }}"' \
-p:PackageVersion="${{ steps.version.outputs.version-without-v }}" \
-p:RepositoryUrl="${{ matrix.package.repo }}" \
- name: Push
shell: bash
run: |-
dotnet nuget push ./build-output/*.nupkg \
-k ${{ secrets.NUGET_AUTH }} \
-s ${{ env.nuget }} \