From 5fd90755090787ad4cc4a1417aeabc81911fe913 Mon Sep 17 00:00:00 2001 From: Madhukar Moogala Date: Fri, 17 Jul 2026 14:38:37 +0530 Subject: [PATCH 1/3] Bump Autodesk.Forge.Core to 4.1.2 for signed DLL release --- Directory.Build.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Build.props b/Directory.Build.props index bea06ba..8c2d6cf 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,6 +1,6 @@ - 4.1.1 + 4.1.2 net8.0 enable From dd8b8edb0c06f1043a3decb0a54c7f299fa13f49 Mon Sep 17 00:00:00 2001 From: Madhukar Moogala Date: Fri, 17 Jul 2026 14:58:37 +0530 Subject: [PATCH 2/3] Add workflow to publish a pre-signed nupkg from a GitHub Release to NuGet.org --- .github/workflows/publish-signed.yml | 49 ++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/publish-signed.yml diff --git a/.github/workflows/publish-signed.yml b/.github/workflows/publish-signed.yml new file mode 100644 index 0000000..314aaa9 --- /dev/null +++ b/.github/workflows/publish-signed.yml @@ -0,0 +1,49 @@ +name: Publish Signed Package + +# Publishes a pre-signed .nupkg (attached as a GitHub Release asset) directly to +# nuget.org, with no build/pack step. Use this for releases where the DLL was +# signed locally with garasign (which requires Autodesk's internal network and +# is not reachable from GitHub-hosted runners). +# +# Usage: +# 1. Build and sign the package locally, then attach the .nupkg (and .snupkg, +# if present) as an asset to a GitHub Release, e.g.: +# gh release create v4.1.2-signed Autodesk.Forge.Core.4.1.2.nupkg Autodesk.Forge.Core.4.1.2.snupkg --title "v4.1.2 (signed)" +# 2. Run this workflow from the Actions tab (workflow_dispatch), providing the +# release tag and the exact .nupkg asset filename. + +on: + workflow_dispatch: + inputs: + release_tag: + description: "GitHub release tag containing the signed .nupkg asset" + required: true + package_name: + description: "Exact .nupkg asset filename to push (e.g. Autodesk.Forge.Core.4.1.2.nupkg)" + required: true + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 8.0.x + + - name: Download signed package from release + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + mkdir -p ./packages + gh release download "${{ inputs.release_tag }}" \ + --repo "${{ github.repository }}" \ + --pattern "${{ inputs.package_name }}" \ + --dir ./packages + + - name: Push to NuGet.org + run: | + dotnet nuget push "./packages/${{ inputs.package_name }}" \ + -k "${{ secrets.NUGETAPIKEYBYENGOPS }}" \ + -s https://api.nuget.org/v3/index.json \ + --skip-duplicate From dca72e2c2aa48c25a97ff0215328ef27cd0bd3f0 Mon Sep 17 00:00:00 2001 From: Madhukar Moogala Date: Fri, 17 Jul 2026 15:07:07 +0530 Subject: [PATCH 3/3] Address Copilot review: handle .snupkg symbol package, add explicit permissions --- .github/workflows/publish-signed.yml | 44 ++++++++++++++++++---------- 1 file changed, 29 insertions(+), 15 deletions(-) diff --git a/.github/workflows/publish-signed.yml b/.github/workflows/publish-signed.yml index 314aaa9..437a909 100644 --- a/.github/workflows/publish-signed.yml +++ b/.github/workflows/publish-signed.yml @@ -1,27 +1,33 @@ name: Publish Signed Package -# Publishes a pre-signed .nupkg (attached as a GitHub Release asset) directly to -# nuget.org, with no build/pack step. Use this for releases where the DLL was -# signed locally with garasign (which requires Autodesk's internal network and -# is not reachable from GitHub-hosted runners). +# Publishes a pre-signed package set (.nupkg and, if present, its .snupkg symbol +# package) attached as GitHub Release assets directly to nuget.org, with no +# build/pack step. Use this for releases where the DLL was signed locally with +# garasign (which requires Autodesk's internal network and is not reachable +# from GitHub-hosted runners). # # Usage: # 1. Build and sign the package locally, then attach the .nupkg (and .snupkg, -# if present) as an asset to a GitHub Release, e.g.: +# if present) as assets to a GitHub Release, e.g.: # gh release create v4.1.2-signed Autodesk.Forge.Core.4.1.2.nupkg Autodesk.Forge.Core.4.1.2.snupkg --title "v4.1.2 (signed)" # 2. Run this workflow from the Actions tab (workflow_dispatch), providing the -# release tag and the exact .nupkg asset filename. +# release tag and the package id+version (e.g. Autodesk.Forge.Core.4.1.2). +# Both the .nupkg and, if attached, the matching .snupkg will be downloaded +# and pushed together. on: workflow_dispatch: inputs: release_tag: - description: "GitHub release tag containing the signed .nupkg asset" + description: "GitHub release tag containing the signed .nupkg (and optional .snupkg) asset" required: true - package_name: - description: "Exact .nupkg asset filename to push (e.g. Autodesk.Forge.Core.4.1.2.nupkg)" + package_id_version: + description: "Package id + version, no extension (e.g. Autodesk.Forge.Core.4.1.2)" required: true +permissions: + contents: read + jobs: publish: runs-on: ubuntu-latest @@ -31,19 +37,27 @@ jobs: with: dotnet-version: 8.0.x - - name: Download signed package from release + - name: Download signed package(s) from release env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | mkdir -p ./packages gh release download "${{ inputs.release_tag }}" \ --repo "${{ github.repository }}" \ - --pattern "${{ inputs.package_name }}" \ + --pattern "${{ inputs.package_id_version }}.nupkg" \ --dir ./packages + gh release download "${{ inputs.release_tag }}" \ + --repo "${{ github.repository }}" \ + --pattern "${{ inputs.package_id_version }}.snupkg" \ + --dir ./packages \ + --skip-existing || echo "No matching .snupkg asset found, continuing with .nupkg only." - name: Push to NuGet.org run: | - dotnet nuget push "./packages/${{ inputs.package_name }}" \ - -k "${{ secrets.NUGETAPIKEYBYENGOPS }}" \ - -s https://api.nuget.org/v3/index.json \ - --skip-duplicate + for f in ./packages/*.nupkg ./packages/*.snupkg; do + [ -e "$f" ] || continue + dotnet nuget push "$f" \ + -k "${{ secrets.NUGETAPIKEYBYENGOPS }}" \ + -s https://api.nuget.org/v3/index.json \ + --skip-duplicate + done