FluffySpoon.Publisher
1.165.0
Prefix Reserved
dotnet add package FluffySpoon.Publisher --version 1.165.0
NuGet\Install-Package FluffySpoon.Publisher -Version 1.165.0
<PackageReference Include="FluffySpoon.Publisher" Version="1.165.0" />
paket add FluffySpoon.Publisher --version 1.165.0
#r "nuget: FluffySpoon.Publisher, 1.165.0"
// Install FluffySpoon.Publisher as a Cake Addin #addin nuget:?package=FluffySpoon.Publisher&version=1.165.0 // Install FluffySpoon.Publisher as a Cake Tool #tool nuget:?package=FluffySpoon.Publisher&version=1.165.0
FluffySpoon.Publishers
Publishes NuGet and NPM packages to the respective repositories.
Usage
You can also see a command-line runnable version of the following example here.
The code below will:
- Find all repositories in https://github.com/ffMathy that start with
FluffySpoon.
and have been modified within the past 30 days. - For each repository, sorted by update date descending:
- Determine the version of the package. The version used will be
1.0.<number of commits in repository>
. - For each C# project found in the
src
folder of the root of the repository:- Build
src/<ProjectName>
usingdotnet build
. - Test
src/<ProjectName>.Tests
if present usingdotnet test
. - Publish to NuGet if tests pass or no tests were present.
- Build
- For each NodeJS project found in the
src
folder of the root of the repository:- Build the root directory using
npm run build
. - Test the root directory using
npm run test
. - Publish to NPM.
- Build the root directory using
- Determine the version of the package. The version used will be
- For each C# project, publish it to NuGet.
- For each NodeJS project, publish it to NPM.
class Program
{
static void Main()
{
var services = new ServiceCollection();
//configure the publisher to take all GitHub repositories starting with "FluffySpoon."
services.AddRepositoryToPackagePublisher("FluffySpoon.");
//configure the publisher to use specific credentials for GitHub
services.AddGitHubProviderForAccessToken("ffMathy", "my GitHub access token");
//configure NuGet publishing
services.AddNuGetProvider("my NuGet API key");
//configure NPM publishing
services.AddNpmProvider("my NPM key");
//configure .NET Core project support
services.AddDotNetProvider();
//configure NodeJS project support
services.AddNodeJsProvider();
var provider = services.BuildServiceProvider();
var publisher = provider.GetRequiredService<IRepositoryToPackagePublisher>();
publisher.RefreshAllPackagesFromAllRepositoriesAsync().Wait();
Console.WriteLine("All done!");
}
}
Running in GitHub Actions
Below is an example of running the sample code on an GitHub Actions using environment variables.
dotnet.yml
name: .NET
on:
push:
schedule:
- cron: '0 * * * *'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: Build
env:
ProjectNamePrefix: FluffySpoon.
GitHubUsername: ffMathy
NuGetKey: ${{ secrets.NuGetKey }}
NpmAuthToken: ${{ secrets.NpmAuthToken }}
GitHubPersonalAccessToken: ${{ secrets.GitHubPersonalAccessToken }}
run: |
cd src
dotnet restore
dotnet build
cd FluffySpoon.Publisher.Sample
dotnet run
Running in AppVeyor
Below is an example of running the sample code on an AppVeyor build server using environment variables.
AppVeyor.yml
version: 1.0.{build}
image: Visual Studio 2017
environment:
NuGetKey:
secure: 14GsJ75nn9jwVPMQXN7qN8xrwhyAY8TwIvvsQ+P1yzahdtfl83J8cyN+aA9WhtSY
ProjectNamePrefix: FluffySpoon.
GitHubUsername: ffMathy
NpmAuthToken:
secure: dg3EnwKFzX5E40SPkoPK53pW2D2W5sjCGV4xhORTCoe50OEASg8Xk9mI12SBVadI
GitHubPersonalAccessToken:
secure: ECBBXkriJnyuksnl3PYf7PQ/WLyRZLXf9qgLyIlOIeh4e8EnYCX5gkgmyyO1/HR+
install:
- ps: |
Install-Product node '' x64
npm install typescript -g
build_script:
- cmd: |
cd src
dotnet restore
dotnet build
cd FluffySpoon.Publisher.Sample
dotnet run
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net6.0
- Microsoft.Extensions.DependencyInjection (>= 5.0.2)
- Octokit (>= 0.50.0)
- System.Diagnostics.Process (>= 4.3.0)
- system.io (>= 4.3.0)
- system.io.filesystem (>= 4.3.0)
- system.io.filesystem.driveinfo (>= 4.3.1)
NuGet packages (5)
Showing the top 5 NuGet packages that depend on FluffySpoon.Publisher:
Package | Downloads |
---|---|
FluffySpoon.Publisher.DotNet
Publishes NPM or NuGet packages automatically. |
|
FluffySpoon.Publisher.NuGet
Publishes NPM or NuGet packages automatically. |
|
FluffySpoon.Publisher.GitHub
Publishes NPM or NuGet packages automatically. |
|
FluffySpoon.Publisher.NodeJs
Publishes NPM or NuGet packages automatically. |
|
FluffySpoon.Publisher.Npm
Publishes NPM or NuGet packages automatically. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.165.0 | 1,694 | 1/13/2024 |
1.164.0 | 283 | 1/13/2024 |
1.163.0 | 2,031 | 4/17/2023 |
1.158.0 | 683 | 3/4/2023 |
1.157.0 | 748 | 2/24/2023 |
1.155.0 | 687 | 2/22/2023 |
1.154.0 | 682 | 2/21/2023 |
1.153.0 | 1,084 | 11/8/2022 |
1.152.0 | 1,873 | 5/4/2022 |
1.151.0 | 1,554 | 3/12/2022 |
1.150.0 | 1,182 | 3/12/2022 |
1.148.0 | 1,200 | 3/12/2022 |
1.147.0 | 1,192 | 3/12/2022 |
1.146.0 | 1,205 | 3/12/2022 |
1.145.0 | 1,239 | 3/12/2022 |
1.138.0 | 1,217 | 3/12/2022 |
1.111.0 | 14,473 | 11/27/2019 |
1.110.0 | 1,939 | 11/27/2019 |
1.109.0 | 2,527 | 11/1/2019 |
1.108.0 | 8,809 | 1/13/2019 |
1.106.0 | 2,171 | 1/13/2019 |
1.105.0 | 2,155 | 1/13/2019 |
1.104.0 | 1,685 | 1/13/2019 |
1.103.0 | 1,416 | 1/13/2019 |
1.102.0 | 2,659 | 1/13/2019 |
1.100.0 | 2,075 | 1/13/2019 |
1.99.1 | 2,132 | 1/13/2019 |
1.97.1 | 1,410 | 1/13/2019 |
1.96.1 | 1,894 | 1/13/2019 |
1.95.1 | 2,086 | 1/13/2019 |
1.94.1 | 2,165 | 1/13/2019 |
1.0.93 | 2,106 | 1/13/2019 |
1.0.89 | 2,086 | 1/12/2019 |
1.0.88 | 2,732 | 12/13/2018 |
1.0.86 | 2,751 | 11/8/2018 |
1.0.84 | 2,309 | 10/28/2018 |
1.0.83 | 2,816 | 8/25/2018 |
1.0.82 | 2,177 | 8/25/2018 |
1.0.81 | 2,154 | 8/25/2018 |
1.0.80 | 2,938 | 7/18/2018 |
1.0.79 | 2,150 | 7/18/2018 |
1.0.77 | 2,212 | 7/18/2018 |
1.0.75 | 2,187 | 7/18/2018 |
1.0.74 | 2,273 | 7/18/2018 |
1.0.72 | 2,285 | 7/12/2018 |
1.0.71 | 2,542 | 7/3/2018 |
1.0.70 | 2,339 | 6/27/2018 |
1.0.64 | 2,584 | 6/13/2018 |
1.0.62 | 2,207 | 6/12/2018 |
1.0.60 | 2,452 | 5/29/2018 |
1.0.57 | 3,147 | 4/18/2018 |
1.0.56 | 2,766 | 4/6/2018 |
1.0.55 | 2,434 | 4/4/2018 |
1.0.54 | 2,333 | 4/4/2018 |
1.0.53 | 2,201 | 4/3/2018 |
1.0.51 | 2,902 | 4/3/2018 |
1.0.50 | 2,389 | 4/3/2018 |
1.0.44 | 2,366 | 4/2/2018 |
1.0.40 | 5,595 | 8/28/2017 |
1.0.39 | 2,174 | 8/24/2017 |
1.0.37 | 1,816 | 8/23/2017 |
1.0.35 | 1,880 | 5/19/2017 |
1.0.34 | 1,856 | 5/19/2017 |
1.0.33 | 1,831 | 5/19/2017 |
1.0.30 | 1,849 | 5/19/2017 |
1.0.26 | 1,975 | 5/12/2017 |