mirror of
https://github.com/Ellpeck/MLEM.git
synced 2024-11-28 07:18:35 +01:00
Compare commits
No commits in common. "49bc5b7f25b87bac11e77bb8f7f5a40d60fec99c" and "32ba3c4142a7db34e61bd9b8d7256adcd7b32527" have entirely different histories.
49bc5b7f25
...
32ba3c4142
4 changed files with 17 additions and 22 deletions
6
.github/workflows/main.yml
vendored
6
.github/workflows/main.yml
vendored
|
@ -23,7 +23,7 @@ jobs:
|
||||||
- name: Run cake
|
- name: Run cake
|
||||||
uses: coactions/setup-xvfb@v1
|
uses: coactions/setup-xvfb@v1
|
||||||
with:
|
with:
|
||||||
run: dotnet cake --target Publish --ref ${{ github.ref }} --buildNum ${{ github.run_number }}
|
run: dotnet cake --target Publish --branch ${{ github.ref_name }}
|
||||||
env:
|
env:
|
||||||
NUGET_KEY: ${{ secrets.NUGET_KEY }}
|
NUGET_KEY: ${{ secrets.NUGET_KEY }}
|
||||||
BAGET_KEY: ${{ secrets.BAGET_KEY }}
|
BAGET_KEY: ${{ secrets.BAGET_KEY }}
|
||||||
|
@ -41,9 +41,9 @@ jobs:
|
||||||
- name: Restore tools
|
- name: Restore tools
|
||||||
run: dotnet tool restore
|
run: dotnet tool restore
|
||||||
- name: Run cake
|
- name: Run cake
|
||||||
run: dotnet cake --target Document --ref ${{ github.ref }} --buildNum ${{ github.run_number }}
|
run: dotnet cake --target Document --branch $GITHUB_REF_NAME
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
if: github.event_name == 'push' && github.ref_name == 'release'
|
||||||
# this is a beautiful way to deploy a website and i will not take any criticism
|
# this is a beautiful way to deploy a website and i will not take any criticism
|
||||||
run: |
|
run: |
|
||||||
curl -L --output cloudflared.deb https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb && sudo dpkg -i cloudflared.deb
|
curl -L --output cloudflared.deb https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb && sudo dpkg -i cloudflared.deb
|
||||||
|
|
|
@ -2,8 +2,7 @@
|
||||||
MLEM tries to adhere to [semantic versioning](https://semver.org/). Potentially breaking changes are written in **bold**.
|
MLEM tries to adhere to [semantic versioning](https://semver.org/). Potentially breaking changes are written in **bold**.
|
||||||
|
|
||||||
Jump to version:
|
Jump to version:
|
||||||
- [6.3.2](#632-in-development)
|
- [6.3.1](#631-in-development)
|
||||||
- [6.3.1](#631)
|
|
||||||
- [6.3.0](#630)
|
- [6.3.0](#630)
|
||||||
- [6.2.0](#620)
|
- [6.2.0](#620)
|
||||||
- [6.1.0](#610)
|
- [6.1.0](#610)
|
||||||
|
@ -13,11 +12,7 @@ Jump to version:
|
||||||
- [5.1.0](#510)
|
- [5.1.0](#510)
|
||||||
- [5.0.0](#500)
|
- [5.0.0](#500)
|
||||||
|
|
||||||
## 6.3.2 (In Development)
|
## 6.3.1 (In Development)
|
||||||
|
|
||||||
## 6.3.1
|
|
||||||
|
|
||||||
No code changes
|
|
||||||
|
|
||||||
## 6.3.0
|
## 6.3.0
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
exports.preTransform = function (model) {
|
exports.preTransform = function (model) {
|
||||||
if (model._path.includes("index")) {
|
if (model._path.includes("index")) {
|
||||||
|
// point to the release branch in the readme
|
||||||
|
model.conceptual = model.conceptual.replaceAll(/\/MLEM(\/[^/]+)?\/main\//g, "/MLEM$1/release/");
|
||||||
|
|
||||||
// reduce header levels by 1 to allow for TOC navigation
|
// reduce header levels by 1 to allow for TOC navigation
|
||||||
for (let i = 5; i >= 1; i--)
|
for (let i = 5; i >= 1; i--)
|
||||||
model.conceptual = model.conceptual.replaceAll(`<h${i}`, `<h${i + 1}`).replaceAll(`</h${i}`, `</h${i + 1}`);
|
model.conceptual = model.conceptual.replaceAll(`<h${i}`, `<h${i + 1}`).replaceAll(`</h${i}`, `</h${i + 1}`);
|
||||||
|
|
21
build.cake
21
build.cake
|
@ -1,23 +1,22 @@
|
||||||
#addin nuget:?package=Cake.DocFx&version=1.0.0
|
#addin nuget:?package=Cake.DocFx&version=1.0.0
|
||||||
#tool dotnet:?package=docfx&version=2.75.3
|
#tool dotnet:?package=docfx&version=2.70.3
|
||||||
|
|
||||||
// this is the upcoming version, for prereleases
|
// this is the upcoming version, for prereleases
|
||||||
var version = Argument("version", "6.3.2");
|
var version = Argument("version", "6.3.1");
|
||||||
var target = Argument("target", "Default");
|
var target = Argument("target", "Default");
|
||||||
var gitRef = Argument("ref", "refs/heads/main");
|
var branch = Argument("branch", "main");
|
||||||
var buildNum = Argument("buildNum", "");
|
|
||||||
var config = Argument("configuration", "Release");
|
var config = Argument("configuration", "Release");
|
||||||
var serve = HasArgument("serve");
|
var serve = HasArgument("serve");
|
||||||
|
|
||||||
Task("Prepare").Does(() => {
|
Task("Prepare").Does(() => {
|
||||||
DotNetWorkloadInstall("android");
|
DotNetWorkloadInstall("android");
|
||||||
|
|
||||||
DotNetRestore("MLEM.sln");
|
DotNetRestore("MLEM.sln");
|
||||||
DotNetRestore("MLEM.FNA.sln");
|
DotNetRestore("MLEM.FNA.sln");
|
||||||
|
|
||||||
if (!gitRef.StartsWith("refs/tags/") && !string.IsNullOrEmpty(buildNum)) {
|
if (branch != "release") {
|
||||||
Information($"Appending {buildNum} to version");
|
var buildNum = EnvironmentVariable("GITHUB_RUN_NUMBER");
|
||||||
version += $"-ci.{buildNum}";
|
if (!string.IsNullOrEmpty(buildNum))
|
||||||
|
version += "-ci." + buildNum;
|
||||||
}
|
}
|
||||||
|
|
||||||
DeleteFiles("**/MLEM*.nupkg");
|
DeleteFiles("**/MLEM*.nupkg");
|
||||||
|
@ -53,16 +52,14 @@ Task("Pack").IsDependentOn("Test").Does(() => {
|
||||||
DotNetPack("MLEM.FNA.sln", settings);
|
DotNetPack("MLEM.FNA.sln", settings);
|
||||||
});
|
});
|
||||||
|
|
||||||
Task("Push").WithCriteria(gitRef == "refs/heads/main" || gitRef.StartsWith("refs/tags/"), "Not on main branch or tag").IsDependentOn("Pack").Does(() => {
|
Task("Push").WithCriteria(branch == "main" || branch == "release", "Not on main or release branch").IsDependentOn("Pack").Does(() => {
|
||||||
DotNetNuGetPushSettings settings;
|
DotNetNuGetPushSettings settings;
|
||||||
if (gitRef.StartsWith("refs/tags/")) {
|
if (branch == "release") {
|
||||||
Information("Pushing to public feed");
|
|
||||||
settings = new DotNetNuGetPushSettings {
|
settings = new DotNetNuGetPushSettings {
|
||||||
Source = "https://api.nuget.org/v3/index.json",
|
Source = "https://api.nuget.org/v3/index.json",
|
||||||
ApiKey = EnvironmentVariable("NUGET_KEY")
|
ApiKey = EnvironmentVariable("NUGET_KEY")
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
Information("Pushing to private feed");
|
|
||||||
settings = new DotNetNuGetPushSettings {
|
settings = new DotNetNuGetPushSettings {
|
||||||
Source = "https://nuget.ellpeck.de/v3/index.json",
|
Source = "https://nuget.ellpeck.de/v3/index.json",
|
||||||
ApiKey = EnvironmentVariable("BAGET_KEY")
|
ApiKey = EnvironmentVariable("BAGET_KEY")
|
||||||
|
|
Loading…
Reference in a new issue