Compare commits
No commits in common. "ae766c70cbe128e16a0ffe2c4b067bc62537e220" and "7ca04eb538ed47811819b0cbafa622d3788422c8" have entirely different histories.
ae766c70cb
...
7ca04eb538
@ -1,52 +0,0 @@
|
|||||||
name: CI Build
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ master ]
|
|
||||||
paths-ignore:
|
|
||||||
- '**/*.md'
|
|
||||||
- '**/*.gitignore'
|
|
||||||
- '**/*.gitattributes'
|
|
||||||
pull_request:
|
|
||||||
branches: [ master ]
|
|
||||||
workflow_dispatch:
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
packages: write
|
|
||||||
|
|
||||||
env:
|
|
||||||
DOTNET_NOLOGO: true # Disable the .NET logo
|
|
||||||
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true # Disable the .NET first time experience
|
|
||||||
DOTNET_CLI_TELEMETRY_OPTOUT: true # Disable sending .NET CLI telemetry
|
|
||||||
MINOR_VERSION_OVERRIDE: 0
|
|
||||||
|
|
||||||
GITEA_SERVER_URL: ${{ secrets.S_GITEA_SERVER_URL }}
|
|
||||||
GITEA_PACKAGE_OWNER: ${{ secrets.S_GITEA_PACKAGE_OWNER }}
|
|
||||||
GITEA_PACKAGE_OWNER_USER: ${{ secrets.S_GITEA_PACKAGE_OWNER_USER }}
|
|
||||||
GITEA_PACKAGE_OWNER_PASSWORD: ${{ secrets.S_GITEA_PACKAGE_OWNER_PASSWORD }}
|
|
||||||
GITEA_NUGET_SOURCE_NAME: ${{ vars.S_GITEA_NUGET_SOURCE_NAME }}
|
|
||||||
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-ci-api:
|
|
||||||
runs-on: [linux,self-hosted]
|
|
||||||
name: CI Build API
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: https://github.com/actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Setup .NET 9
|
|
||||||
uses: https://github.com/actions/setup-dotnet@v4
|
|
||||||
with:
|
|
||||||
dotnet-version: 9.x
|
|
||||||
|
|
||||||
- name: Make Build File Executable
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
chmod +x ./build.cmd
|
|
||||||
chmod +x ./build.sh
|
|
||||||
|
|
||||||
- name: Run Nuke Build
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
./build.cmd -Target Publish
|
|
||||||
@ -8,7 +8,6 @@ using Nuke.Common.IO;
|
|||||||
using Nuke.Common.ProjectModel;
|
using Nuke.Common.ProjectModel;
|
||||||
using Nuke.Common.Tooling;
|
using Nuke.Common.Tooling;
|
||||||
using Nuke.Common.Tools.DotNet;
|
using Nuke.Common.Tools.DotNet;
|
||||||
using Nuke.Common.Tools.Git;
|
|
||||||
using Nuke.Common.Tools.GitVersion;
|
using Nuke.Common.Tools.GitVersion;
|
||||||
using Nuke.Common.Utilities.Collections;
|
using Nuke.Common.Utilities.Collections;
|
||||||
using static Nuke.Common.EnvironmentInfo;
|
using static Nuke.Common.EnvironmentInfo;
|
||||||
@ -24,6 +23,7 @@ class Build : NukeBuild
|
|||||||
|
|
||||||
public static int Main() => Execute<Build>(x => x.Pack);
|
public static int Main() => Execute<Build>(x => x.Pack);
|
||||||
|
|
||||||
|
private const string NuGetSourceUrl = "https://api.nuget.org/v3/index.json";
|
||||||
private const string LibraryProjectName = "Universley.OrleansContrib.StreamsProvider.Redis";
|
private const string LibraryProjectName = "Universley.OrleansContrib.StreamsProvider.Redis";
|
||||||
|
|
||||||
[Parameter("Configuration to build - Default is 'Debug' (local) or 'Release' (server)")]
|
[Parameter("Configuration to build - Default is 'Debug' (local) or 'Release' (server)")]
|
||||||
@ -43,9 +43,6 @@ class Build : NukeBuild
|
|||||||
[Parameter("NuGet API key")]
|
[Parameter("NuGet API key")]
|
||||||
readonly string NuGetApiKey;
|
readonly string NuGetApiKey;
|
||||||
|
|
||||||
[Parameter("Gitea Nuget package source name")]
|
|
||||||
readonly string GiteaNugetSourceName = Environment.GetEnvironmentVariable("GITEA_NUGET_SOURCE_NAME");
|
|
||||||
|
|
||||||
Target Clean => _ => _
|
Target Clean => _ => _
|
||||||
.Before(Restore)
|
.Before(Restore)
|
||||||
.Executes(() =>
|
.Executes(() =>
|
||||||
@ -109,21 +106,14 @@ class Build : NukeBuild
|
|||||||
.Executes(() =>
|
.Executes(() =>
|
||||||
{
|
{
|
||||||
DotNetTasks.DotNetNuGetPush(s => s
|
DotNetTasks.DotNetNuGetPush(s => s
|
||||||
.SetSource(GiteaNugetSourceName)
|
.SetSource(NuGetSourceUrl)
|
||||||
.SetApiKey(NuGetApiKey)
|
.SetApiKey(NuGetApiKey)
|
||||||
.SetTargetPath(NuGetPackagesDirectory / $"{LibraryProjectName}.{GitVersion.NuGetVersionV2}.snupkg"));
|
.SetTargetPath(NuGetPackagesDirectory / $"{LibraryProjectName}.{GitVersion.NuGetVersionV2}.snupkg"));
|
||||||
|
|
||||||
DotNetTasks.DotNetNuGetPush(s => s
|
DotNetTasks.DotNetNuGetPush(s => s
|
||||||
.SetSource(GiteaNugetSourceName)
|
.SetSource(NuGetSourceUrl)
|
||||||
|
.SetApiKey(NuGetApiKey)
|
||||||
.SetTargetPath(NuGetPackagesDirectory / $"{LibraryProjectName}.{GitVersion.NuGetVersionV2}.nupkg"));
|
.SetTargetPath(NuGetPackagesDirectory / $"{LibraryProjectName}.{GitVersion.NuGetVersionV2}.nupkg"));
|
||||||
});
|
});
|
||||||
|
|
||||||
Target CreateAndPushGitTag => _ => _
|
|
||||||
.Executes(() =>
|
|
||||||
{
|
|
||||||
var gitTag = $"{GitVersion.NuGetVersionV2}";
|
|
||||||
GitTasks.Git($"tag {gitTag}");
|
|
||||||
GitTasks.Git($"push origin {gitTag}");
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user