Skip to content

Commit

Permalink
Yet another one ci update
Browse files Browse the repository at this point in the history
  • Loading branch information
nilproject committed Jan 19, 2023
1 parent cc0154b commit ad5e328
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 8 deletions.
24 changes: 18 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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/

4 changes: 3 additions & 1 deletion NiL.JS/NiL.JS.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<Description>ECMAScript 6 (ES2015) engine</Description>
<AssemblyTitle>NiL.JS</AssemblyTitle>
<Authors>NiLProject</Authors>
<PackageReleaseNotes>Release.md</PackageReleaseNotes>
<TargetFrameworks Condition="'$(TargetFrameworks)' == ''">netcoreapp3.1;net461;net48;net5.0;net6.0;net7.0</TargetFrameworks>
<DefineConstants>TRACE;INLINE</DefineConstants>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
Expand Down Expand Up @@ -33,8 +34,9 @@
<PropertyGroup Condition="'$(VersionPrefix)' == ''">
<VersionPrefix>2.5</VersionPrefix>
</PropertyGroup>

<ItemGroup>
<None Include="../Release.md" Pack="true" PackagePath="" />
<None Include="../License" Pack="true" PackagePath="" />
<None Include="../nil.js logo small.png" Pack="true" PackagePath="" />
</ItemGroup>
Expand Down
3 changes: 2 additions & 1 deletion buildReleaseMessage.ps1
Original file line number Diff line number Diff line change
@@ -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)"));
Expand Down
3 changes: 3 additions & 0 deletions pack.ps1
Original file line number Diff line number Diff line change
@@ -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)"";
Expand Down

0 comments on commit ad5e328

Please sign in to comment.