Add nightly builds on main CI and tag-based official releases#33
Conversation
Co-authored-by: LittleLittleCloud <16876986+LittleLittleCloud@users.noreply.github.com>
LittleLittleCloud
left a comment
There was a problem hiding this comment.
In reader, add different package badges for official build and nightly builds
|
@copilot Resolved comments |
Co-authored-by: LittleLittleCloud <16876986+LittleLittleCloud@users.noreply.github.com>
Added separate badges for stable and nightly builds in commit 679ce9c: Changes:
The badges now clearly distinguish between official releases and nightly builds, making it easy for users to choose their preferred version. |
| types: [published] | ||
| push: | ||
| tags: | ||
| - 'v*.*.*' |
There was a problem hiding this comment.
Support '..*' pattern as well, like 0.0.9
There was a problem hiding this comment.
Added support for tag pattern without 'v' prefix. The release workflow now triggers on both:
v*.*.*(e.g., v0.0.5, v1.2.3)*.*.*(e.g., 0.0.9, 1.2.3)
Both patterns will trigger the same official release workflow that publishes stable packages to NuGet.org and creates GitHub releases.
Co-authored-by: LittleLittleCloud <16876986+LittleLittleCloud@users.noreply.github.com>
There was a problem hiding this comment.
Pull Request Overview
Introduce automated nightly prerelease publishing and tag-driven stable releases, plus README badge differentiation.
- Add publish-nightly job to CI to push dated prerelease (nightly) packages from main.
- Convert release workflow to trigger on semantic version tags and create GitHub Releases; extend artifact retention; remove SHA-based suffix for stable packages.
- Update README badges to separately show stable and nightly package versions.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| README.md | Replace single prerelease badges with distinct stable/nightly/gallery badges. |
| .github/workflows/release.yml | Switch trigger to version tag pushes, remove version suffix logic, extend retention, add GitHub Release creation. |
| .github/workflows/ci.yml | Add nightly publish job with version suffix generation and package push. |
| types: [published] | ||
| push: | ||
| tags: | ||
| - 'v*.*.*' |
There was a problem hiding this comment.
'..' already matches tags starting with 'v' (e.g. 'v1.2.3'), making 'v..' redundant. Remove the redundant pattern to simplify the trigger list to a single '..*' entry.
| - 'v*.*.*' |
| uses: softprops/action-gh-release@v1 | ||
| if: startsWith(github.ref, 'refs/tags/') | ||
| with: |
There was a problem hiding this comment.
The third-party action softprops/action-gh-release is referenced by a mutable tag ('v1'), which can change unexpectedly. Pin this action to a specific commit SHA (and optionally add a comment with the original tag) to mitigate supply chain risks.
| uses: softprops/action-gh-release@v1 | |
| if: startsWith(github.ref, 'refs/tags/') | |
| with: | |
| # Originally: softprops/action-gh-release@v1 | |
| uses: softprops/action-gh-release@c7e6c9e2e6e8e6e2e6e8e6e2e6e8e6e2e6e8e6e2 | |
| if: startsWith(github.ref, 'refs/tags/') |
| - name: Restore | ||
| run: dotnet restore RazorConsole.sln | ||
|
|
||
| - name: Build | ||
| run: dotnet build RazorConsole.sln --configuration Release --no-restore -p:VersionSuffix=$VersionSuffix | ||
|
|
||
| - name: Test | ||
| run: dotnet test RazorConsole.sln --configuration Release --no-build --verbosity normal -p:VersionSuffix=$VersionSuffix |
There was a problem hiding this comment.
The nightly job rebuilds and retests even though it depends on build-test, duplicating compute time. Consider publishing build artifacts from build-test and reusing them here (e.g. download artifacts and use 'dotnet pack --no-build') to avoid redundant restore/build/test.
Overview
This PR implements two distinct publishing workflows to automate package distribution:
mainChanges
🌙 Nightly Builds (CI Workflow)
Added a
publish-nightlyjob to.github/workflows/ci.ymlthat:mainbranch{version}-alpha.nightly-YYYYMMDD-{short-sha}RazorConsole.Core.0.0.5-alpha.nightly-20251016-bc1dd1bBenefits:
🚀 Official Releases (Release Workflow)
Updated
.github/workflows/release.ymlto:v*.*.*or*.*.*patterns (e.g.,v0.0.5,0.0.9,v1.2.3,1.2.3)Benefits:
0.0.5)📛 README Badge Updates
Updated badges in
README.mdto distinguish between stable and nightly builds:0.0.5)0.0.5-alpha.nightly-20251016-bc1dd1b)Benefits:
Migration from Previous Approach
mainpushv*.*.*and*.*.*supportedUsage
Nightly builds (automatic):
Official releases (supports both formats):
Testing
Both version schemes have been validated:
0.0.5-alpha.nightly-20251016-bc1dd1b.nupkg0.0.5.nupkgv*.*.*and*.*.*) supportedFixes #32
Original prompt
Fixes #32
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.