From 75045ecad38f5da404af61350f83109e94fd3579 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 12 Apr 2026 23:57:16 +0000 Subject: [PATCH 1/3] Update publish workflow to trigger on merge to main with auto-incremented patch version Agent-Logs-Url: https://github.com/jaredpar/basic-reference-assemblies/sessions/6685f415-fc2d-4fba-9289-91358b1d10b7 Co-authored-by: jaredpar <146967+jaredpar@users.noreply.github.com> --- .github/workflows/publish.yml | 57 ++++++++++++++++++----------------- 1 file changed, 29 insertions(+), 28 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index f4f1065..b722fa5 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,46 +1,47 @@ name: Publish NuGet Packages -on: - workflow_dispatch: - inputs: - version: - description: 'Package Version' - required: true - type: string - default: '' - publish: - description: 'Publish Packages' - required: true - type: boolean - default: true +on: + push: + branches: [ main ] jobs: publish: name: Publish NuGet runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Compute Next Version + id: version + run: | + latest=$(git tag --list 'v*' --sort=-version:refname | head -n 1) + if [ -z "$latest" ]; then + next="1.0.0" + else + version="${latest#v}" + major=$(echo "$version" | cut -d. -f1) + minor=$(echo "$version" | cut -d. -f2) + patch=$(echo "$version" | cut -d. -f3) + next="${major}.${minor}.$((patch + 1))" + fi + echo "version=${next}" >> "$GITHUB_OUTPUT" + - name: Setup .NET - uses: actions/setup-dotnet@v1 + uses: actions/setup-dotnet@v4 with: dotnet-version: 9.0.x - name: Pack Solution - run: dotnet pack -p:PackageOutputPath="${GITHUB_WORKSPACE}/packages" -p:IncludeSymbols=false -p:RepositoryCommit=${GITHUB_SHA} -p:PackageVersion="${{ github.event.inputs.version }}" -c Release + run: dotnet pack -p:PackageOutputPath="${GITHUB_WORKSPACE}/packages" -p:IncludeSymbols=false -p:RepositoryCommit=${GITHUB_SHA} -p:PackageVersion="${{ steps.version.outputs.version }}" -c Release - name: Publish NuPkg Files - if: ${{ github.event.inputs.publish }} run: dotnet nuget push "$GITHUB_WORKSPACE/packages/*.nupkg" -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json - name: Create Tag and Release - if: ${{ github.event.inputs.publish }} - id: create_release - uses: actions/create-release@v1 env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: v${{ github.event.inputs.version }} - release_name: Release v${{ github.event.inputs.version }} - body: | - Create release ${{ github.event.inputs.version }} - draft: false - prerelease: false + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + gh release create "v${{ steps.version.outputs.version }}" \ + --title "Release v${{ steps.version.outputs.version }}" \ + --notes "Create release ${{ steps.version.outputs.version }}" From 5fa9396ddbb64ede23f1f259473f127b5a80d5c0 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 13 Apr 2026 00:50:54 +0000 Subject: [PATCH 2/3] Restore workflow_dispatch trigger with optional version override Agent-Logs-Url: https://github.com/jaredpar/basic-reference-assemblies/sessions/19a39b49-846f-4b2d-a18a-a157074fe47e Co-authored-by: jaredpar <146967+jaredpar@users.noreply.github.com> --- .github/workflows/publish.yml | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index b722fa5..877e22d 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -2,6 +2,13 @@ name: Publish NuGet Packages on: push: branches: [ main ] + workflow_dispatch: + inputs: + version: + description: 'Package Version (leave blank to auto-increment patch)' + required: false + type: string + default: '' jobs: publish: @@ -15,15 +22,19 @@ jobs: - name: Compute Next Version id: version run: | - latest=$(git tag --list 'v*' --sort=-version:refname | head -n 1) - if [ -z "$latest" ]; then - next="1.0.0" + if [ -n "${{ github.event.inputs.version }}" ]; then + next="${{ github.event.inputs.version }}" else - version="${latest#v}" - major=$(echo "$version" | cut -d. -f1) - minor=$(echo "$version" | cut -d. -f2) - patch=$(echo "$version" | cut -d. -f3) - next="${major}.${minor}.$((patch + 1))" + latest=$(git tag --list 'v*' --sort=-version:refname | head -n 1) + if [ -z "$latest" ]; then + next="1.0.0" + else + version="${latest#v}" + major=$(echo "$version" | cut -d. -f1) + minor=$(echo "$version" | cut -d. -f2) + patch=$(echo "$version" | cut -d. -f3) + next="${major}.${minor}.$((patch + 1))" + fi fi echo "version=${next}" >> "$GITHUB_OUTPUT" From 76961c8eee7f8e6bb38ca835b70a351e7fe3b4dc Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 13 Apr 2026 01:00:22 +0000 Subject: [PATCH 3/3] Match complog publish pattern: workflow_run + workflow_dispatch triggers Agent-Logs-Url: https://github.com/jaredpar/basic-reference-assemblies/sessions/3a3bd19d-3b24-4a5e-ad3a-9f28d7934700 Co-authored-by: jaredpar <146967+jaredpar@users.noreply.github.com> --- .github/workflows/publish.yml | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 877e22d..d97ad94 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,19 +1,23 @@ name: Publish NuGet Packages on: - push: - branches: [ main ] workflow_dispatch: inputs: version: - description: 'Package Version (leave blank to auto-increment patch)' - required: false - type: string + description: 'Package Version' + required: true default: '' + workflow_run: + workflows: ["Code Validation"] + branches: [main] + types: [completed] jobs: publish: name: Publish NuGet runs-on: ubuntu-latest + if: >- + github.event_name == 'workflow_dispatch' || + (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success') steps: - uses: actions/checkout@v4 with: @@ -22,8 +26,8 @@ jobs: - name: Compute Next Version id: version run: | - if [ -n "${{ github.event.inputs.version }}" ]; then - next="${{ github.event.inputs.version }}" + if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then + echo "version=${{ github.event.inputs.version }}" >> "$GITHUB_OUTPUT" else latest=$(git tag --list 'v*' --sort=-version:refname | head -n 1) if [ -z "$latest" ]; then @@ -35,8 +39,8 @@ jobs: patch=$(echo "$version" | cut -d. -f3) next="${major}.${minor}.$((patch + 1))" fi + echo "version=${next}" >> "$GITHUB_OUTPUT" fi - echo "version=${next}" >> "$GITHUB_OUTPUT" - name: Setup .NET uses: actions/setup-dotnet@v4