Remove SHA from prerelease version, use only commit count

- Changed prerelease version format from {LAST_TAG}-preview.{COMMIT_COUNT}+{SHA} to {LAST_TAG}-preview.{COMMIT_COUNT}
- Updated documentation in NUGET_RELEASE.md and TESTING.md to reflect the change
- Removed git rev-parse call for short SHA since it's no longer needed

Co-authored-by: adamhathcock <527620+adamhathcock@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-01-02 18:03:18 +00:00
parent caa82a6146
commit 7f71f76f6e
3 changed files with 6 additions and 7 deletions

View File

@@ -21,8 +21,8 @@ The workflow automatically determines the version based on whether the commit is
2. **Untagged Release (Prerelease)**:
- If the current commit is NOT tagged
- Creates a prerelease version based on the last tag
- Format: `{LAST_TAG}-preview.{COMMIT_COUNT}+{SHORT_SHA}`
- Example: `0.42.1-preview.123+abc1234`
- Format: `{LAST_TAG}-preview.{COMMIT_COUNT}`
- Example: `0.42.1-preview.123`
- Published as a prerelease to NuGet.org
### Workflow Steps
@@ -81,7 +81,7 @@ Consider enabling branch protection rules for the `release` branch to ensure:
```
2. The workflow will automatically:
- Build and test the project
- Publish a prerelease version like `0.42.1-preview.456+abc1234` to NuGet.org
- Publish a prerelease version like `0.42.1-preview.456` to NuGet.org
## Troubleshooting

View File

@@ -26,7 +26,7 @@ This tests the workflow on untagged commits to the release branch.
4. Monitor the GitHub Actions workflow at: https://github.com/adamhathcock/sharpcompress/actions
5. Verify:
- Workflow triggers and runs successfully
- Version is determined correctly (e.g., `0.42.1-preview.XXX+XXXXXXX`)
- Version is determined correctly (e.g., `0.42.1-preview.XXX`)
- Build and tests pass
- Package is uploaded as artifact
- Package is pushed to NuGet.org as prerelease
@@ -34,7 +34,7 @@ This tests the workflow on untagged commits to the release branch.
**Expected Outcome:**
- A new prerelease package appears on NuGet.org: https://www.nuget.org/packages/SharpCompress/
- Package version follows pattern: `{LAST_TAG}-preview.{COMMIT_COUNT}+{SHA}`
- Package version follows pattern: `{LAST_TAG}-preview.{COMMIT_COUNT}`
### 2. Test Tagged Release Publishing