Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
name: release

on:
workflow_dispatch:
push:
tags:
- 'v*'
Comment on lines +4 to +6
Copy link

Copilot AI Apr 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tag filter v* also matches a tag named exactly v, which would make RELEASE_VERSION empty after ${GITHUB_REF_NAME#v} and cause dotnet pack to run with an empty PackageVersion. Consider tightening the tag glob (e.g., require at least one character after v) and/or adding a guard that fails the job when RELEASE_VERSION is empty/invalid.

Copilot uses AI. Check for mistakes.

jobs:
build:
Expand All @@ -15,14 +17,12 @@ jobs:
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x
- name: Get latest tag version
- name: Get version from tag
id: vars
Copy link

Copilot AI Apr 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Step Get version from tag sets id: vars but no step outputs are defined/consumed. Either remove the unused id or switch to step outputs (via $GITHUB_OUTPUT) if you intended to reference the version as steps.vars.outputs....

Suggested change
id: vars

Copilot uses AI. Check for mistakes.
run: echo "tag=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
run: echo "RELEASE_VERSION=${GITHUB_REF_NAME#v}" >> $GITHUB_ENV
- name: Package
env:
RELEASE_VERSION: ${{ env.tag }}
run: |
echo "Release version: $RELEASE_VERSION"
dotnet pack -p:PackageVersion=0.2.2
dotnet pack -p:PackageVersion=$RELEASE_VERSION
Copy link

Copilot AI Apr 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workflow only overrides PackageVersion. The project file currently hardcodes both <Version> and <PackageVersion> (e.g., 0.2.2), so the assembly/package metadata can become inconsistent across releases. Consider also passing -p:Version=$RELEASE_VERSION (or removing the hardcoded values from the project) so all version metadata comes from the tag.

Suggested change
dotnet pack -p:PackageVersion=$RELEASE_VERSION
dotnet pack -p:Version=$RELEASE_VERSION -p:PackageVersion=$RELEASE_VERSION

Copilot uses AI. Check for mistakes.
dotnet nuget push DotPrompt.Sql/nupkg/*.nupkg -k ${{ secrets.AZURECODER_NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json --skip-duplicate

Loading