From 80dc0f2afa22b5502fc7a7472442e3fbbdd81fd9 Mon Sep 17 00:00:00 2001 From: Thomas Bruderer Date: Fri, 30 Oct 2026 11:11:43 +0100 Subject: [PATCH 1/2] Publish spike branches to the GitHub Packages feed with sortable versions The nightly workflow also runs on spike/** branches, labels their packages after the branch (spike-traits.20261030.12 next to nightly.20261030.12) and uses a date plus the run number as the suffix, so the versions sort chronologically; the commit stays in the Source Link metadata. The SDK step matches build.yml. The repository URL is given without the .git suffix so that GitHub Packages links the packages to this repository. Co-Authored-By: Claude Fable 5.1 --- .github/workflows/publish-nightly-package.yml | 23 +++++++++++++++++-- Directory.Build.props | 2 ++ .../Extensions/DictionaryExtensionTest.cs | 2 +- 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish-nightly-package.yml b/.github/workflows/publish-nightly-package.yml index 76ed4b3c1..3d5aa0fcc 100644 --- a/.github/workflows/publish-nightly-package.yml +++ b/.github/workflows/publish-nightly-package.yml @@ -2,17 +2,36 @@ on: push: branches: - main + - 'spike/**' name: Publish Nightly Packages +# Every push to main publishes a nightly to the polyadic GitHub Packages feed +# (https://github.com/orgs/polyadic/packages?repo_name=funcky, feed https://nuget.pkg.github.com/polyadic/index.json), +# a spike branch publishes a preview of the same packages under its own label. The suffix is a date and the run +# number, so the versions sort chronologically (a commit hash would not); the commit itself is in the package's +# repository metadata (Source Link). jobs: publish: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-dotnet@v4 - name: Install Current .NET SDK + name: Install .NET SDK 11.0 (release candidate) + with: + dotnet-version: '11.0.x' + dotnet-quality: 'preview' + - name: Compute version suffix + id: version + # main -> nightly.20261030.12, spike/traits -> spike-traits.20261030.12 (a prerelease label allows letters, digits, hyphens and dots) + run: | + if [ "${GITHUB_REF_NAME}" = "main" ]; then + label="nightly" + else + label="$(echo "${GITHUB_REF_NAME}" | tr '/_' '--' | tr -c -d 'A-Za-z0-9-')" + fi + echo "suffix=${label}.$(date -u +%Y%m%d).${GITHUB_RUN_NUMBER}" >> "$GITHUB_OUTPUT" - name: Pack Packages - run: dotnet pack --configuration Release --output nupkg --version-suffix "nightly.$(git rev-parse --short "${{github.sha}}")" + run: dotnet pack --configuration Release --output nupkg --version-suffix "${{steps.version.outputs.suffix}}" - name: Push Packages run: dotnet nuget push --source https://nuget.pkg.github.com/polyadic/index.json --api-key ${{secrets.GITHUB_TOKEN}} nupkg/Funcky.*.nupkg diff --git a/Directory.Build.props b/Directory.Build.props index 376d2cb91..755cc1abf 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -16,6 +16,8 @@ enable + + https://github.com/polyadic/funcky true true true diff --git a/Funcky.Test/Extensions/DictionaryExtensionTest.cs b/Funcky.Test/Extensions/DictionaryExtensionTest.cs index 163e820e5..78adef67e 100644 --- a/Funcky.Test/Extensions/DictionaryExtensionTest.cs +++ b/Funcky.Test/Extensions/DictionaryExtensionTest.cs @@ -6,7 +6,7 @@ public sealed class DictionaryExtensionTest public void GivenADictionaryWhenWeLookForAnExistentValueWithGetValueOrNoneThenTheResultShouldBeASomeOfTheGivenType() { var dictionary = new Dictionary { ["some"] = "value" }; - Assert.Some("value", dictionary.GetValueOrNone(key: "some")); + FunctionalAssert.Some("value", dictionary.GetValueOrNone(key: "some")); } [Fact] From f26066f159b6c6d32f8a8b407770e67caeb186a1 Mon Sep 17 00:00:00 2001 From: Thomas Bruderer Date: Fri, 30 Oct 2026 14:02:43 +0100 Subject: [PATCH 2/2] Drop an unrelated local change to DictionaryExtensionTest that slipped into the previous commit Co-Authored-By: Claude Fable 5.1 --- Funcky.Test/Extensions/DictionaryExtensionTest.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Funcky.Test/Extensions/DictionaryExtensionTest.cs b/Funcky.Test/Extensions/DictionaryExtensionTest.cs index 78adef67e..163e820e5 100644 --- a/Funcky.Test/Extensions/DictionaryExtensionTest.cs +++ b/Funcky.Test/Extensions/DictionaryExtensionTest.cs @@ -6,7 +6,7 @@ public sealed class DictionaryExtensionTest public void GivenADictionaryWhenWeLookForAnExistentValueWithGetValueOrNoneThenTheResultShouldBeASomeOfTheGivenType() { var dictionary = new Dictionary { ["some"] = "value" }; - FunctionalAssert.Some("value", dictionary.GetValueOrNone(key: "some")); + Assert.Some("value", dictionary.GetValueOrNone(key: "some")); } [Fact]