Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions .github/workflows/Nuget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,38 +43,41 @@ jobs:

echo "version=$version" >> $GITHUB_OUTPUT

# Four numbers: the version without its prerelease or build suffix, and a zero.
echo "file_version=${version%%[-+]*}.0" >> $GITHUB_OUTPUT

- name: 'Pack and publish AngouriMath'
run: |
cd Sources/AngouriMath
dotnet restore AngouriMath.csproj
dotnet build AngouriMath.csproj -c release
dotnet pack AngouriMath.csproj -c release -p:PackageVersion=${{ steps.version.outputs.version }}
dotnet build AngouriMath.csproj -c release -p:Version=${{ steps.version.outputs.version }} -p:FileVersion=${{ steps.version.outputs.file_version }}
dotnet pack AngouriMath.csproj -c release -p:Version=${{ steps.version.outputs.version }} -p:FileVersion=${{ steps.version.outputs.file_version }}
cd bin/release
dotnet nuget push AngouriMath.${{ steps.version.outputs.version }}.nupkg --api-key ${{ secrets.NUGET_KEY }} --source nuget.org

- name: 'Pack and publish AngouriMath.FSharp'
run: |
cd Sources/Wrappers/AngouriMath.FSharp
dotnet restore
dotnet build -c Release
dotnet pack -c Release -p:PackageVersion=${{ steps.version.outputs.version }}
dotnet build -c Release -p:Version=${{ steps.version.outputs.version }} -p:FileVersion=${{ steps.version.outputs.file_version }}
dotnet pack -c Release -p:Version=${{ steps.version.outputs.version }} -p:FileVersion=${{ steps.version.outputs.file_version }}
cd bin/Release
dotnet nuget push AngouriMath.FSharp.${{ steps.version.outputs.version }}.nupkg --api-key ${{ secrets.NUGET_KEY }} --source nuget.org

- name: 'Pack and publish AngouriMath.Interactive'
run: |
cd Sources/Wrappers/AngouriMath.Interactive
dotnet restore
dotnet build -c Release
dotnet pack -c Release -p:PackageVersion=${{ steps.version.outputs.version }}
dotnet build -c Release -p:Version=${{ steps.version.outputs.version }} -p:FileVersion=${{ steps.version.outputs.file_version }}
dotnet pack -c Release -p:Version=${{ steps.version.outputs.version }} -p:FileVersion=${{ steps.version.outputs.file_version }}
cd bin/Release
dotnet nuget push AngouriMath.Interactive.${{ steps.version.outputs.version }}.nupkg --api-key ${{ secrets.NUGET_KEY }} --source nuget.org

- name: 'Pack and publish AngouriMath.Terminal'
run: |
cd Sources/Terminal/AngouriMath.Terminal
dotnet restore
dotnet build -c Release
dotnet pack -c Release -p:PackageVersion=${{ steps.version.outputs.version }}
dotnet build -c Release -p:Version=${{ steps.version.outputs.version }} -p:FileVersion=${{ steps.version.outputs.file_version }}
dotnet pack -c Release -p:Version=${{ steps.version.outputs.version }} -p:FileVersion=${{ steps.version.outputs.file_version }}
cd bin/Release
dotnet nuget push AngouriMath.Terminal.${{ steps.version.outputs.version }}.nupkg --api-key ${{ secrets.NUGET_KEY }} --source nuget.org
11 changes: 6 additions & 5 deletions Sources/Package.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@

<PropertyGroup>
<!--
The version under development. The NuGet workflow overrides PackageVersion from the
release tag, so what ships is named by the tag; this is what a local build and the
assembly metadata carry.
The version under development, which a local build carries. The NuGet and terminal release
workflows pass the release tag's version as Version and FileVersion, so what ships carries
the tag in its assemblies as well as in its package's name.
https://github.com/asc-community/AngouriMath/issues/1678
-->
<Version>2.3.0</Version>
<Version>2.6.0</Version>

<!--
Pinned to the major for the whole of 2.x, and deliberately not tracking Version.
Expand All @@ -36,7 +37,7 @@
can express that. FileVersion carries the release for anyone reading file properties.
-->
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<FileVersion>2.3.0.0</FileVersion>
<FileVersion>2.6.0.0</FileVersion>

<Authors>WhiteBlackGoose and contributors</Authors>
<Company>Angouri</Company>
Expand Down
11 changes: 10 additions & 1 deletion Sources/Terminal/AngouriMath.Terminal/publish.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
#!/bin/bash


# The release's version, which the workflow passes as TERMINAL_VERSION, goes into the assemblies
# as well as the package names: FileVersion is four numbers, the version without its suffix and
# a zero. https://github.com/asc-community/AngouriMath/issues/1678
version_properties=()
if [ -n "${TERMINAL_VERSION:-}" ]; then
version_properties=(-p:Version="$TERMINAL_VERSION" -p:FileVersion="${TERMINAL_VERSION%%[-+]*}.0")
fi

# Portable runtime identifiers: since .NET 8 a versioned one such as osx.12-arm64 is not
# recognised, and the publish fails with NETSDK1083.
for arch in linux-x64 linux-arm linux-arm64 win-x64 win-x86 osx-x64 osx-arm64
Expand All @@ -9,6 +17,7 @@ do
-r $arch \
-c Release \
-o ./publish-output/$arch \
--self-contained
--self-contained \
"${version_properties[@]}"
done

Loading