Skip to content

Fix release workflow to strip 'v' prefix from version tag - #3

Merged
StevenTCramer merged 1 commit into
masterfrom
Cramer/2025-10-08/dev
Oct 11, 2025
Merged

StevenTCramer merged 1 commit into
masterfrom
Cramer/2025-10-08/dev

Conversation

@StevenTCramer

Copy link
Copy Markdown
Contributor

Summary

  • Fix release workflow to properly handle version tags with 'v' prefix
  • Strips the 'v' prefix from git tags before passing to dotnet build/pack commands

Problem

The release workflow was extracting the full git tag name (e.g., v1.0.0-beta.13) and passing it directly to the /p:Version= parameter. NuGet version strings don't support the 'v' prefix, causing build errors:

error NETSDK1018: Invalid NuGet version string: 'v1.0.0-beta.13'

Solution

Added a simple bash parameter expansion to strip the leading 'v':

VERSION=${GITHUB_REF#refs/tags/}
VERSION=${VERSION#v}

This transforms v1.0.0-beta.13 → 1.0.0-beta.13 which is valid for NuGet.

Test plan

  • Syntax is valid bash
  • Will be verified on next release tag push

🤖 Generated with Claude Code

NuGet version strings don't support the 'v' prefix. The workflow
extracts the git tag (e.g., v1.0.0-beta.13) and strips the 'v' to get
the proper NuGet version format (1.0.0-beta.13).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@StevenTCramer
StevenTCramer merged commit 3e783e4 into master Oct 11, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant