Skip to content

Commit b033f0f

Browse files
committed
fix tag release package publishing
1 parent 7c4a15c commit b033f0f

3 files changed

Lines changed: 14 additions & 8 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,6 @@ jobs:
5555
uses: actions/upload-artifact@v7
5656
with:
5757
name: package
58-
path: artifacts/*.*nupkg
58+
path: artifacts/*.nupkg
5959
if-no-files-found: error
6060
retention-days: 7

.github/workflows/release.yml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,19 @@ on:
44
push:
55
tags:
66
- 'v*'
7+
workflow_dispatch:
8+
inputs:
9+
release_tag:
10+
description: Existing version tag to validate and release
11+
required: true
12+
type: string
713

814
permissions:
915
contents: write
1016

1117
env:
1218
DOTNET_VERSION: '10.0.x'
19+
RELEASE_TAG: ${{ inputs.release_tag || github.ref_name }}
1320

1421
jobs:
1522
release:
@@ -22,6 +29,7 @@ jobs:
2229
uses: actions/checkout@v6
2330
with:
2431
fetch-depth: 0
32+
ref: ${{ env.RELEASE_TAG }}
2533

2634
- name: Setup .NET
2735
uses: actions/setup-dotnet@v5
@@ -34,9 +42,9 @@ jobs:
3442
run: |
3543
set -euo pipefail
3644
VERSION="$(dotnet msbuild src/ManagedCode.FileContext/ManagedCode.FileContext.csproj -nologo -getProperty:PackageVersion | tr -d '\r')"
37-
TAG_VERSION="${GITHUB_REF_NAME#v}"
45+
TAG_VERSION="${RELEASE_TAG#v}"
3846
if [ -z "${VERSION}" ] || [ "${TAG_VERSION}" != "${VERSION}" ]; then
39-
echo "::error::Tag ${GITHUB_REF_NAME} does not match package version ${VERSION}."
47+
echo "::error::Tag ${RELEASE_TAG} does not match package version ${VERSION}."
4048
exit 1
4149
fi
4250
echo "version=${VERSION}" >> "${GITHUB_OUTPUT}"
@@ -54,7 +62,7 @@ jobs:
5462
run: dotnet test tests/ManagedCode.FileContext.Tests/ManagedCode.FileContext.Tests.csproj --configuration Release --no-build
5563

5664
- name: Pack
57-
run: dotnet pack src/ManagedCode.FileContext/ManagedCode.FileContext.csproj --configuration Release --no-build --output artifacts
65+
run: dotnet pack src/ManagedCode.FileContext/ManagedCode.FileContext.csproj --configuration Release --no-build --output artifacts -p:IncludeSymbols=false
5866

5967
- name: Publish to NuGet
6068
shell: bash
@@ -75,7 +83,7 @@ jobs:
7583
env:
7684
GH_TOKEN: ${{ github.token }}
7785
run: |
78-
gh release create "${GITHUB_REF_NAME}" artifacts/*.*nupkg \
79-
--title "${GITHUB_REF_NAME}" \
86+
gh release create "${RELEASE_TAG}" artifacts/*.nupkg \
87+
--title "${RELEASE_TAG}" \
8088
--generate-notes \
8189
--verify-tag

Directory.Build.props

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@
2929
<PackageTags>dotnet;agent-framework;file-context;storage;rag;knowledge-graph;markdown;openai;ai-agents;nuget</PackageTags>
3030
<PublishRepositoryUrl>true</PublishRepositoryUrl>
3131
<EmbedUntrackedSources>true</EmbedUntrackedSources>
32-
<IncludeSymbols>true</IncludeSymbols>
33-
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
3432
<EnablePackageValidation>true</EnablePackageValidation>
3533
</PropertyGroup>
3634

0 commit comments

Comments
 (0)