From ad5e328ae7c4d3b935b1168a3bc80072bac8f066 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=BC=D0=B8=D1=82=D1=80=D0=B8=D0=B9?= Date: Thu, 19 Jan 2023 12:42:38 +0300 Subject: [PATCH] Yet another one ci update --- .github/workflows/release.yml | 24 ++++++++++++++++++------ NiL.JS/NiL.JS.csproj | 4 +++- buildReleaseMessage.ps1 | 3 ++- pack.ps1 | 3 +++ 4 files changed, 26 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index caf8fe791..aa7cf3dee 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -102,6 +102,19 @@ jobs: $certificatePath = Join-Path -Path $env:Project_Directory -ChildPath keys.snk [IO.File]::WriteAllBytes("$certificatePath", $snk_byte) + - name: Run TinyT4 + run: | + cd Tests + dotnet run --project ..\Utility\tiny-t4\ --framework net7.0 + + - name: Test .NET Core 7.0 + run: | + cd Tests + dotnet test -c Release -property:TargetFramework=net7.0 -property:SignAssembly=false -property:PublicSign=false + + - name: Build release message + run: | + ./buildReleaseMessage.ps1 > ./Release.md # Create the app package by building and packaging the Windows Application Packaging project - name: Create the app package @@ -132,15 +145,14 @@ jobs: git tag $TAG git push --tags - - name: Build release message - run: | - echo ${{ steps.tag.outputs.tag }} - ./buildReleaseMessage.ps1 > ./release.md - - name: Make release ${{ steps.tag.outputs.tag }} uses: ncipollo/release-action@v1 with: tag: ${{ steps.tag.outputs.tag }} name: ${{ steps.tag.outputs.tag }} artifacts: ${{ env.Nuget_Pack_Output_Directory }}/* - bodyFile: ./release.md + bodyFile: ./Release.md + + - name: Upload package to nuget.org + run: dotnet nuget push nuget/NiL.JS.${{ steps.tag.outputs.tag }}.nupkg -k ${{ secrets.NUGET_ORG_TOKEN }} -s https://nuget.org/ + \ No newline at end of file diff --git a/NiL.JS/NiL.JS.csproj b/NiL.JS/NiL.JS.csproj index 73cfdf560..9a8608ede 100644 --- a/NiL.JS/NiL.JS.csproj +++ b/NiL.JS/NiL.JS.csproj @@ -4,6 +4,7 @@ ECMAScript 6 (ES2015) engine NiL.JS NiLProject + Release.md netcoreapp3.1;net461;net48;net5.0;net6.0;net7.0 TRACE;INLINE true @@ -33,8 +34,9 @@ 2.5 - + + diff --git a/buildReleaseMessage.ps1 b/buildReleaseMessage.ps1 index 583683a0e..14de260fe 100644 --- a/buildReleaseMessage.ps1 +++ b/buildReleaseMessage.ps1 @@ -1,5 +1,6 @@ +$LAST_TAG=$(git tag|where{$_ -Match "^\d+.\d+.\d+$"})[-1] $URL=$(git remote get-url origin).Replace('.git', '') + "/commit/"; -$COMMITS=$(git cherry $($(git describe --tags).Split('-')[0]) HEAD) +$COMMITS=$(git cherry $LAST_TAG HEAD) foreach ($commit in $COMMITS){ $commit=$commit.Replace('+', '').Trim(); $message=(iex (echo "git show -s --format=%B $($commit)")); diff --git a/pack.ps1 b/pack.ps1 index 78d817aa5..5160c41f9 100644 --- a/pack.ps1 +++ b/pack.ps1 @@ -1,9 +1,12 @@ +$VERSION="$VERSION" +if ($VERSION -eq "") { $VERSION="2.5" } echo $( rd nil.js\bin -Force -Recurse -erroraction 'silentlycontinue' rd nil.js\obj -Force -Recurse -erroraction 'silentlycontinue' mkdir nuget -erroraction 'silentlycontinue' ) > $null $REVISION=$(git rev-list --count origin/develop) +echo "VERSION: $VERSION.$REVISION" [System.IO.File]::WriteAllText("$(get-location)\\NiL.JS\\Properties\\InternalInfo.cs","internal static class InternalInfo { internal const string Version = ""$VERSION.$($REVISION)"";