mirror of
https://github.com/NuclearPowered/Reactor.git
synced 2026-10-19 15:51:54 +00:00
Update CI
This commit is contained in:
3 files changed
+16
-13
No files matched your search
@@ -3,7 +3,7 @@
|
||||
"isRoot": true,
|
||||
"tools": {
|
||||
"cake.tool": {
|
||||
"version": "1.1.0",
|
||||
"version": "2.2.0",
|
||||
"commands": [
|
||||
"dotnet-cake"
|
||||
]
|
||||
|
||||
@@ -46,7 +46,12 @@ jobs:
|
||||
path: Reactor.Debugger/bin/Release/net6.0/Reactor.Debugger.dll
|
||||
|
||||
- uses: softprops/action-gh-release@v1
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
if: github.ref_type == 'tag'
|
||||
with:
|
||||
draft: true
|
||||
files: Reactor/bin/Release/net6.0/Reactor.dll
|
||||
|
||||
- name: Push nightly NuGet package
|
||||
if: github.repository == 'NuclearPowered/Reactor' && github.ref == 'refs/heads/master'
|
||||
run: |
|
||||
dotnet nuget push Reactor/bin/Release/Reactor.*.nupkg --source https://nuget.reactor.gg/v3/index.json --api-key ${{ secrets.REACTOR_NUGET_KEY }}
|
||||
+9
-11
@@ -1,33 +1,31 @@
|
||||
var target = Argument("target", "Build");
|
||||
|
||||
var buildId = EnvironmentVariable("GITHUB_RUN_NUMBER");
|
||||
|
||||
var @ref = EnvironmentVariable("GITHUB_REF");
|
||||
const string prefix = "refs/tags/";
|
||||
var tag = !string.IsNullOrEmpty(@ref) && @ref.StartsWith(prefix) ? @ref.Substring(prefix.Length) : null;
|
||||
var workflow = BuildSystem.GitHubActions.Environment.Workflow;
|
||||
var buildId = workflow.RunNumber;
|
||||
var tag = workflow.RefType == GitHubActionsRefType.Tag ? workflow.RefName : null;
|
||||
|
||||
Task("Build")
|
||||
.Does(() =>
|
||||
{
|
||||
var settings = new DotNetCoreBuildSettings
|
||||
var settings = new DotNetBuildSettings
|
||||
{
|
||||
Configuration = "Release",
|
||||
MSBuildSettings = new DotNetCoreMSBuildSettings()
|
||||
MSBuildSettings = new DotNetMSBuildSettings()
|
||||
};
|
||||
|
||||
if (tag != null)
|
||||
{
|
||||
settings.MSBuildSettings.Properties["Version"] = new[] { tag };
|
||||
settings.MSBuildSettings.Version = tag;
|
||||
}
|
||||
else if (buildId != null)
|
||||
else if (buildId != 0)
|
||||
{
|
||||
settings.VersionSuffix = "ci." + buildId;
|
||||
settings.MSBuildSettings.VersionSuffix = "ci." + buildId;
|
||||
}
|
||||
|
||||
foreach (var gamePlatform in new[] { "Steam", "Itch" })
|
||||
{
|
||||
settings.MSBuildSettings.Properties["GamePlatform"] = new[] { gamePlatform };
|
||||
DotNetCoreBuild(".", settings);
|
||||
DotNetBuild(".", settings);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user