-
Notifications
You must be signed in to change notification settings - Fork 58
94 lines (81 loc) · 3.36 KB
/
Copy pathpublish.yml
File metadata and controls
94 lines (81 loc) · 3.36 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
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: publish
on:
workflow_dispatch:
inputs:
pack_simplebutton:
description: "Pack SimpleToolkit.SimpleButton"
required: true
type: boolean
default: true
pack_simpleshell:
description: "Pack SimpleToolkit.SimpleShell"
required: true
type: boolean
default: true
pack_helpers:
description: "Pack SimpleToolkit.Helpers"
required: true
type: boolean
default: true
push_simplebutton:
description: "Push SimpleToolkit.SimpleButton"
required: false
type: boolean
default: false
push_simpleshell:
description: "Push SimpleToolkit.SimpleShell"
required: false
type: boolean
default: false
push_helpers:
description: "Push SimpleToolkit.Helpers"
required: false
type: boolean
default: false
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
DOTNET_NOLOGO: true
NuGetDirectory: .\nuget
SimpleButtonNuGetDirectory: .\nuget\SimpleButton
SimpleShellNuGetDirectory: .\nuget\SimpleShell
HelpersNuGetDirectory: .\nuget\Helpers
defaults:
run:
shell: pwsh
jobs:
publish:
runs-on: windows-2022
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
- name: Install MAUI Workload
run: dotnet workload install maui --ignore-failed-sources
- name: Pack SimpleToolkit.SimpleButton
if: ${{ inputs.pack_simplebutton || inputs.push_simplebutton }}
run: dotnet pack .\src\SimpleToolkit.SimpleButton\SimpleToolkit.SimpleButton.csproj --configuration Release --output ${{ env.SimpleButtonNuGetDirectory }}
- name: Pack SimpleToolkit.SimpleShell
if: ${{ inputs.pack_simpleshell || inputs.push_simpleshell }}
run: dotnet pack .\src\SimpleToolkit.SimpleShell\SimpleToolkit.SimpleShell.csproj --configuration Release --output ${{ env.SimpleShellNuGetDirectory }}
- name: Pack SimpleToolkit.Helpers
if: ${{ inputs.pack_helpers || inputs.push_helpers }}
run: dotnet pack .\src\SimpleToolkit.Helpers\SimpleToolkit.Helpers.csproj --configuration Release --output ${{ env.HelpersNuGetDirectory }}
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: nuget
if-no-files-found: error
retention-days: 90
path: ${{ env.NuGetDirectory }}\**\*.nupkg
- name: Push SimpleToolkit.SimpleButton
if: ${{ inputs.pack_simplebutton && inputs.push_simplebutton }}
run: dotnet nuget push "${{ env.SimpleButtonNuGetDirectory }}\*.nupkg" --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json
- name: Push SimpleToolkit.SimpleShell
if: ${{ inputs.pack_simpleshell && inputs.push_simpleshell }}
run: dotnet nuget push "${{ env.SimpleShellNuGetDirectory }}\*.nupkg" --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json
- name: Push SimpleToolkit.Helpers
if: ${{ inputs.pack_helpers && inputs.push_helpers }}
run: dotnet nuget push "${{ env.HelpersNuGetDirectory }}\*.nupkg" --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json