Skip to content

Commit

Permalink
Nuget build/publish updates
Browse files Browse the repository at this point in the history
Moved to `BlendInteractive.` prefix.
Fixed up packaging.
Added automated signing / publishing.
  • Loading branch information
mrdrbob committed Sep 24, 2022
1 parent a977973 commit ecb2e44
Show file tree
Hide file tree
Showing 12 changed files with 92 additions and 51 deletions.
55 changes: 31 additions & 24 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,43 @@
name: Update NuGet
name: Build and Publish

on: [push]
on: workflow_dispatch

jobs:
build:
runs-on: windows-latest
runs-on: ubuntu-latest

name: Publish Nuget Package
name: Build and Publish Nuget Package
steps:
- uses: actions/checkout@master
- name: Setup .NET Core 2.1
uses: actions/setup-dotnet@v1
- name: Setup dotnet
uses: actions/setup-dotnet@v2
with:
dotnet-version: 2.1.x
- name: Setup .NET Core 3.1
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.x
- name: Setup .NET Core 5.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.x
- name: Run Tests
run:
dotnet test "./tests/Blend.ActionQueue.Tests/Blend.ActionQueue.Tests.csproj"
dotnet-version: |
2.1.x
3.1.x
5.0.x
6.0.x
- name: Build Package
run:
dotnet build -c Release "./src/Blend.ActionQueue/Blend.ActionQueue.csproj"
run:
dotnet build -c Release ./src/BlendInteractive.ActionQueue/BlendInteractive.ActionQueue.csproj /p:ContinuousIntegrationBuild=true
- name: Package Release
run:
dotnet pack -c Release --no-build -o out "./src/Blend.ActionQueue/Blend.ActionQueue.csproj"
- name: Publish Nuget to GitHub registry
run: ls .\out\*.nupkg | foreach { dotnet nuget push $_ -s https://nuget.pkg.github.com/blendinteractive/index.json -k $env:GITHUB_TOKEN }
dotnet pack -c Release --no-build -o out ./src/BlendInteractive.ActionQueue/BlendInteractive.ActionQueue.csproj
- name: Retrieve and decode signing cert
run: echo "$CERTIFICATE_BASE64" | base64 --decode > ./cert.p12
env:
CERTIFICATE_BASE64: ${{ secrets.CERTIFICATE_BASE64 }}
- name: Sign package
run: dotnet nuget sign ./out/*.nupkg --certificate-path ./cert.p12 --timestamper http://ts.ssl.com --certificate-password "$CERT_PASSWORD"
env:
CERT_PASSWORD: ${{ secrets.CERT_PASSWORD }}
- name: Clean up signing cert
run: rm ./cert.p12
- name: Publish package to Github registry
run: dotnet nuget push ./out/*.nupkg -k "$GITHUB_AUTH_TOKEN" -s 'https://nuget.pkg.github.com/blendinteractive/index.json'
env:
GITHUB_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish package to Nuget public registry
run: dotnet nuget push ./out/*.nupkg -k "$NUGET_AUTH_TOKEN" -s 'https://api.nuget.org/v3/index.json'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NUGET_AUTH_TOKEN: ${{ secrets.NUGET_API_KEY }}
4 changes: 2 additions & 2 deletions Blend.ActionQueue.sln → BlendInteractive.ActionQueue.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30907.101
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Blend.ActionQueue", "src\Blend.ActionQueue\Blend.ActionQueue.csproj", "{F8A723BE-F1BA-4235-AAC7-2FA98B002792}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlendInteractive.ActionQueue", "src\BlendInteractive.ActionQueue\BlendInteractive.ActionQueue.csproj", "{F8A723BE-F1BA-4235-AAC7-2FA98B002792}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Blend.ActionQueue.Tests", "tests\Blend.ActionQueue.Tests\Blend.ActionQueue.Tests.csproj", "{87835CBE-2C94-4D91-A7F3-8881FB0E730A}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlendInteractive.ActionQueue.Tests", "tests\BlendInteractive.ActionQueue.Tests\BlendInteractive.ActionQueue.Tests.csproj", "{87835CBE-2C94-4D91-A7F3-8881FB0E730A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
Binary file added icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 0 additions & 16 deletions src/Blend.ActionQueue/Blend.ActionQueue.csproj

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Collections.Concurrent;
using System.Threading;

namespace Blend.ActionQueue
namespace BlendInteractive.ActionQueue
{
public abstract class AbstractActionQueue<T>
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>

<PackageId>BlendInteractive.ActionQueue</PackageId>
<Description>A simple, non-durable queue for when you need something like a message queue, but with minimal setup, for small, low-volume messages or actions where persistence is not a requirement.</Description>

<Version>1.0.1</Version>
<PackageVersion>1.0.1</PackageVersion>
<AssemblyVersion>1.0.1.0</AssemblyVersion>
<FileVersion>1.0.1.0</FileVersion>

<Authors>Blend Interactive</Authors>
<Company>Blend Interactive</Company>

<PackageProjectUrl>https://github.com/blendinteractive/Blend.ActionQueue</PackageProjectUrl>
<RepositoryUrl>https://github.com/blendinteractive/Blend.ActionQueue.git</RepositoryUrl>
<RepositoryType>git</RepositoryType>

<EmbedUntrackedSources>true</EmbedUntrackedSources>
<PackageIcon>icon.png</PackageIcon>
<PackageLicenseFile>License</PackageLicenseFile>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageIconUrl />

<PackageReleaseNotes>Initial Release</PackageReleaseNotes>

<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All"/>
</ItemGroup>

<ItemGroup>
<None Include="..\..\License">
<Pack>True</Pack>
<PackagePath></PackagePath>
</None>
<None Include="..\..\README.md">
<Pack>True</Pack>
<PackagePath></PackagePath>
</None>
<None Include="..\..\icon.png">
<Pack>True</Pack>
<PackagePath></PackagePath>
</None>
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using System.Threading;
using Xunit;

namespace Blend.ActionQueue.Tests
namespace BlendInteractive.ActionQueue.Tests
{
public class Basics
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net6.0</TargetFramework>

<IsPackable>false</IsPackable>
</PropertyGroup>
Expand All @@ -14,7 +14,7 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\Blend.ActionQueue\Blend.ActionQueue.csproj" />
<ProjectReference Include="..\..\src\BlendInteractive.ActionQueue\BlendInteractive.ActionQueue.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;

namespace Blend.ActionQueue.Tests.Examples
namespace BlendInteractive.ActionQueue.Tests.Examples
{
/// <summary>
/// This is an example message type where the `Action` to execute is provided in the constructor.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Threading;
using Xunit;

namespace Blend.ActionQueue.Tests.Examples
namespace BlendInteractive.ActionQueue.Tests.Examples
{
public class ExampleTests
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.Threading;

namespace Blend.ActionQueue.Tests
namespace BlendInteractive.ActionQueue.Tests
{
public class TestAction
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.Threading;

namespace Blend.ActionQueue.Tests
namespace BlendInteractive.ActionQueue.Tests
{
public class TestActionQueue : AbstractActionQueue<TestAction>
{
Expand Down

0 comments on commit ecb2e44

Please sign in to comment.