net9-update-refactorings #1
52
.gitea/workflows/ci-pipeline.yml
Normal file
52
.gitea/workflows/ci-pipeline.yml
Normal file
@ -0,0 +1,52 @@
|
||||
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
|
||||
@ -13,14 +13,21 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RedisStreamsProvider.UnitTe
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "_build", "build\_build.csproj", "{EE8F826D-AFB3-4708-BBA3-894C1B145C44}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ci", "ci", "{02EA681E-C7D8-13C7-8484-4AC65E1B71E8}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".gitea", ".gitea", "{02EA681E-C7D8-13C7-8484-4AC65E1B71E8}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{02EA681E-C7D8-13C7-8484-4AC65E1B71E8}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
.gitea\workflows\ci-pipeline.yml = .gitea\workflows\ci-pipeline.yml
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{EE8F826D-AFB3-4708-BBA3-894C1B145C44}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{EE8F826D-AFB3-4708-BBA3-894C1B145C44}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{35E441B1-DDF7-4497-B1D9-BBD9248690E9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{35E441B1-DDF7-4497-B1D9-BBD9248690E9}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{35E441B1-DDF7-4497-B1D9-BBD9248690E9}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
@ -37,10 +44,15 @@ Global
|
||||
{DF927C2B-A141-4476-86CF-3B4DC8ECB4DE}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{DF927C2B-A141-4476-86CF-3B4DC8ECB4DE}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{DF927C2B-A141-4476-86CF-3B4DC8ECB4DE}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{EE8F826D-AFB3-4708-BBA3-894C1B145C44}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{EE8F826D-AFB3-4708-BBA3-894C1B145C44}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
{02EA681E-C7D8-13C7-8484-4AC65E1B71E8} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {9A8081FD-99C7-4302-A892-DC1DE30F4853}
|
||||
EndGlobalSection
|
||||
|
||||
@ -8,6 +8,7 @@ using Nuke.Common.IO;
|
||||
using Nuke.Common.ProjectModel;
|
||||
using Nuke.Common.Tooling;
|
||||
using Nuke.Common.Tools.DotNet;
|
||||
using Nuke.Common.Tools.Git;
|
||||
using Nuke.Common.Tools.GitVersion;
|
||||
using Nuke.Common.Utilities.Collections;
|
||||
using static Nuke.Common.EnvironmentInfo;
|
||||
@ -23,7 +24,6 @@ class Build : NukeBuild
|
||||
|
||||
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";
|
||||
|
||||
[Parameter("Configuration to build - Default is 'Debug' (local) or 'Release' (server)")]
|
||||
@ -43,6 +43,9 @@ class Build : NukeBuild
|
||||
[Parameter("NuGet API key")]
|
||||
readonly string NuGetApiKey;
|
||||
|
||||
[Parameter("Gitea Nuget package source name")]
|
||||
readonly string GiteaNugetSourceName = Environment.GetEnvironmentVariable("GITEA_NUGET_SOURCE_NAME");
|
||||
|
||||
Target Clean => _ => _
|
||||
.Before(Restore)
|
||||
.Executes(() =>
|
||||
@ -106,14 +109,21 @@ class Build : NukeBuild
|
||||
.Executes(() =>
|
||||
{
|
||||
DotNetTasks.DotNetNuGetPush(s => s
|
||||
.SetSource(NuGetSourceUrl)
|
||||
.SetSource(GiteaNugetSourceName)
|
||||
.SetApiKey(NuGetApiKey)
|
||||
.SetTargetPath(NuGetPackagesDirectory / $"{LibraryProjectName}.{GitVersion.NuGetVersionV2}.snupkg"));
|
||||
|
||||
DotNetTasks.DotNetNuGetPush(s => s
|
||||
.SetSource(NuGetSourceUrl)
|
||||
.SetApiKey(NuGetApiKey)
|
||||
.SetSource(GiteaNugetSourceName)
|
||||
.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