Skip to content

Commit a925951

Browse files
committed
Add NuGet pack workflow, templates, and scripts
1 parent 6c850d7 commit a925951

24 files changed

Lines changed: 139 additions & 0 deletions
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Bug report
2+
description: Create a report to help us improve
3+
title: "Bug title"
4+
labels: [bug]
5+
body:
6+
- type: textarea
7+
validations:
8+
required: true
9+
attributes:
10+
label: Describe the bug
11+
description: A clear and concise description of what the bug is
12+
- type: textarea
13+
validations:
14+
required: true
15+
attributes:
16+
label: To Reproduce
17+
description: Steps to reproduce the behavior
18+
- type: textarea
19+
validations:
20+
required: true
21+
attributes:
22+
label: Expected behavior
23+
description: A clear and concise description of what you expected to happen
24+
- type: textarea
25+
attributes:
26+
label: Screenshots
27+
description: If applicable, add screenshots to help explain your problem
28+
- type: textarea
29+
validations:
30+
required: true
31+
attributes:
32+
label: OS version
33+
description: Which OS versions did you see the issue on?
34+
- type: textarea
35+
validations:
36+
required: true
37+
attributes:
38+
label: .NET version
39+
description: Which .NET versions did you see the issue on?
40+
- type: textarea
41+
validations:
42+
required: true
43+
attributes:
44+
label: WPF-UI NuGet version
45+
description: Which WPF-UI NuGet versions did you see the issue on?
46+
- type: textarea
47+
attributes:
48+
label: Additional context
49+
description: Add any other context about the problem here
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Feature request
2+
description: Suggest an idea for the wpfui
3+
title: "Feature request title"
4+
labels: [enhancement]
5+
body:
6+
- type: textarea
7+
validations:
8+
required: true
9+
attributes:
10+
label: Is your feature request related to a problem? Please describe
11+
description: A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
- type: textarea
13+
validations:
14+
required: true
15+
attributes:
16+
label: Describe the solution you'd like
17+
description: A clear and concise description of what you want to happen
18+
- type: textarea
19+
attributes:
20+
label: Describe alternatives you've considered
21+
description: A clear and concise description of any alternative solutions or features you've considered
22+
- type: textarea
23+
attributes:
24+
label: Additional context
25+
description: Add any other context or screenshots about the feature request here
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: pack
2+
3+
on:
4+
release:
5+
types: [created]
6+
push:
7+
branches:
8+
- master
9+
10+
jobs:
11+
build:
12+
runs-on: windows-latest
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Setup .NET
18+
uses: actions/setup-dotnet@v4
19+
with:
20+
dotnet-version: 10.0.x
21+
22+
- name: Install dependencies
23+
run: dotnet restore src\LibAPNG\LibAPNG.csproj
24+
25+
- name: Build
26+
run: dotnet build src\LibAPNG\LibAPNG.csproj --configuration Release --no-restore
27+
28+
- name: Pack
29+
run: dotnet pack src\LibAPNG\LibAPNG.csproj -c Release --no-build -o out
30+
31+
- name: Push NuGet package
32+
# run: dotnet nuget push "out\*.nupkg" -k ${{secrets.NUGET_AUTH_TOKEN}} --source https://api.nuget.org/v3/index.json
33+
uses: actions/upload-artifact@v4
34+
with:
35+
name: nuget-packages
36+
path: out/*.nupkg

build/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*.nupkg
2+
*.snupkg

build/nuget_pack.ps1

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
Set-Location $PSScriptRoot
2+
3+
Write-Host @"
4+
███╗ ██╗██╗ ██╗ ██████╗ ███████╗████████╗
5+
████╗ ██║██║ ██║██╔════╝ ██╔════╝╚══██╔══╝
6+
██╔██╗ ██║██║ ██║██║ ███╗█████╗ ██║
7+
██║╚██╗██║██║ ██║██║ ██║██╔══╝ ██║
8+
██║ ╚████║╚██████╔╝╚██████╔╝███████╗ ██║
9+
╚═╝ ╚═══╝ ╚═════╝ ╚═════╝ ╚══════╝ ╚═╝
10+
"@
11+
12+
$projects = @(
13+
"..\src\LibAPNG"
14+
)
15+
16+
foreach ($proj in $projects) {
17+
Push-Location $proj
18+
Write-Host "Processing $proj..."
19+
dotnet restore
20+
dotnet build -c Release
21+
dotnet pack -c Release -o ../../build/
22+
Pop-Location
23+
}
24+
25+
Write-Host "`nPress any key to exit..."
26+
[void][System.Console]::ReadKey($true)
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)