Skip to content

Commit 4cbcc43

Browse files
Tom BrewerTom Brewer
authored andcommitted
Initial package publishing workflow
1 parent b551996 commit 4cbcc43

File tree

4 files changed

+67
-0
lines changed

4 files changed

+67
-0
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Publish NuGet Packages
2+
3+
on:
4+
release:
5+
types: [created]
6+
workflow_dispatch:
7+
8+
env:
9+
NUGET_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
10+
NUGET_SOURCE: https://nuget.pkg.github.com/mythetech/index.json
11+
12+
jobs:
13+
publish:
14+
runs-on: ubuntu-latest
15+
permissions:
16+
contents: read
17+
packages: write
18+
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
23+
- name: Get latest .NET SDK
24+
uses: actions/setup-dotnet@v4
25+
with:
26+
dotnet-version: '9.0'
27+
28+
- name: Install .Net WASM workload
29+
run: dotnet workload install wasm-tools
30+
31+
- name: Setup NuGet Authentication
32+
run: dotnet nuget add source --username USERNAME --password ${{ env.NUGET_AUTH_TOKEN }} --store-password-in-clear-text --name github ${{ env.NUGET_SOURCE }}
33+
34+
- name: Build and Pack Components Library
35+
run: |
36+
dotnet pack Mythetech.Components/Mythetech.Components.csproj -c Release --no-build -o ./nupkgs
37+
dotnet pack Mythetech.Components.WebAssembly/Mythetech.Components.WebAssembly.csproj -c Release --no-build -o ./nupkgs
38+
dotnet pack Mythetech.Components.Desktop/Mythetech.Components.Desktop.csproj -c Release --no-build -o ./nupkgs
39+
40+
- name: Publish Packages
41+
run: dotnet nuget push ./nupkgs/*.nupkg --source ${{ env.NUGET_SOURCE }} --api-key ${{ env.NUGET_AUTH_TOKEN }}

Mythetech.Components.Desktop/Mythetech.Components.Desktop.csproj

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@
44
<TargetFramework>net9.0</TargetFramework>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
7+
<PackageId>Mythetech.Components.Desktop</PackageId>
8+
<Version>0.0.1</Version>
9+
<Authors>Mythetech</Authors>
10+
<Description>Desktop-specific components for cross platform blazor applications</Description>
11+
<PackageTags>blazor;desktop;photino;components;ui</PackageTags>
12+
<PackageLicenseExpression>MIT</PackageLicenseExpression>
13+
<RepositoryUrl>https://github.com/mythetech/Mythetech.Components</RepositoryUrl>
14+
<PackageReadmeFile>README.md</PackageReadmeFile>
715
</PropertyGroup>
816

917
<ItemGroup>

Mythetech.Components.WebAssembly/Mythetech.Components.WebAssembly.csproj

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@
44
<TargetFramework>net9.0</TargetFramework>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
7+
<PackageId>Mythetech.Components.WebAssembly</PackageId>
8+
<Version>0.0.1</Version>
9+
<Authors>Mythetech</Authors>
10+
<Description>WebAssembly-specific components for building blazor applications</Description>
11+
<PackageTags>blazor;wasm;components;ui</PackageTags>
12+
<PackageLicenseExpression>MIT</PackageLicenseExpression>
13+
<RepositoryUrl>https://github.com/mythetech/Mythetech.Components</RepositoryUrl>
14+
<PackageReadmeFile>README.md</PackageReadmeFile>
715
</PropertyGroup>
816

917
<ItemGroup>

Mythetech.Components/Mythetech.Components.csproj

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,16 @@
66
<Nullable>enable</Nullable>
77
<Company>Mythetech</Company>
88
<GenerateDocumentationFile>True</GenerateDocumentationFile>
9+
10+
<!-- NuGet Package Metadata -->
11+
<PackageId>Mythetech.Components</PackageId>
12+
<Version>1.0.0</Version>
13+
<Authors>Mythetech</Authors>
14+
<Description>Base component library for Mythetech applications</Description>
15+
<PackageTags>blazor;components;ui</PackageTags>
16+
<PackageLicenseExpression>MIT</PackageLicenseExpression>
17+
<RepositoryUrl>https://github.com/mythetech/Mythetech.Components</RepositoryUrl>
18+
<PackageReadmeFile>README.md</PackageReadmeFile>
919
</PropertyGroup>
1020

1121
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">

0 commit comments

Comments
 (0)