From 1ffd891ffdf11ed65f836d447b552ef40cefb589 Mon Sep 17 00:00:00 2001 From: ang Date: Thu, 23 Jul 2026 18:24:51 +0200 Subject: [PATCH] Publish packages to GitHub Packages --- .github/workflows/publish.yml | 7 +++++-- README.md | 11 +++++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 21153e0..f0ce9f6 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,4 +1,4 @@ -name: Publish NuGet +name: Publish packages on: workflow_dispatch: @@ -12,6 +12,7 @@ jobs: permissions: contents: read id-token: write + packages: write steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0 @@ -26,5 +27,7 @@ jobs: id: nuget-login with: user: ${{ vars.NUGET_USER }} - - name: Publish package and symbols + - name: Publish package and symbols to NuGet.org run: dotnet nuget push artifacts/*.nupkg --api-key ${{ steps.nuget-login.outputs.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate + - name: Publish package to GitHub Packages + run: dotnet nuget push artifacts/*.nupkg --api-key ${{ secrets.GITHUB_TOKEN }} --source https://nuget.pkg.github.com/angsx/index.json --skip-duplicate diff --git a/README.md b/README.md index 1bec3d3..7bc9514 100644 --- a/README.md +++ b/README.md @@ -29,10 +29,17 @@ Start with conventions, then introduce a schema when the workbook becomes a cont ## Install -CellSharp `0.6.0-prerelease` is prerelease software; API details may still evolve before `1.0`: +CellSharp `0.6.1-prerelease` is prerelease software; API details may still evolve before `1.0`: ```bash -dotnet add package CellSharp --version 0.6.0-prerelease +dotnet add package CellSharp --version 0.6.1-prerelease +``` + +NuGet.org is the public package source. The same package is also mirrored to GitHub Packages for GitHub-based CI or private-source configurations. Configure that source with a GitHub classic personal access token that has `read:packages`: + +```bash +dotnet nuget add source --username YOUR_GITHUB_USERNAME --password YOUR_GITHUB_PAT --store-password-in-clear-text --name github "https://nuget.pkg.github.com/angsx/index.json" +dotnet add package CellSharp --version 0.6.1-prerelease --source github ``` The package ID is `CellSharp`.