-
-
Notifications
You must be signed in to change notification settings - Fork 20
Add automated release pipeline with prerelease support #47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Co-authored-by: jkowalleck <[email protected]>
Co-authored-by: jkowalleck <[email protected]>
Co-authored-by: jkowalleck <[email protected]>
Co-authored-by: jkowalleck <[email protected]>
.github/workflows/release.yml
Outdated
| - 'v*' | ||
|
|
||
| # see https://docs.github.com/en/actions/how-tos/writing-workflows/choosing-what-your-workflow-does/controlling-permissions-for-github_token | ||
| permissions: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
per default, no permissions should be assigned.
| permissions: | |
| permissions: {} |
instead, the steps shold be on job level.
@copilot make it so.
.github/workflows/release.yml
Outdated
| uses: ruby/setup-ruby@v1 | ||
| with: | ||
| ruby-version: '3.3' | ||
| bundler-cache: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot why cache? does this not perist cache poisoning?
harden the settings for security reasons.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Disabled bundler-cache and added explicit bundle install --jobs 4 --retry 3 in commit fd75af4. This prevents potential cache poisoning attacks in the supply chain.
Co-authored-by: jkowalleck <[email protected]>
| - name: Install dependencies | ||
| run: bundle install --jobs 4 --retry 3 | ||
|
|
||
| - name: Extract version from tag |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot move the version and determination prerelease detection to an own job
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved version extraction and prerelease detection to dedicated validate job in commit 96a34a4. This job outputs version and prerelease for downstream jobs to consume.
.github/workflows/release.yml
Outdated
| build: | ||
| runs-on: ubuntu-latest | ||
| # see https://docs.github.com/en/actions/how-tos/writing-workflows/choosing-what-your-workflow-does/controlling-permissions-for-github_token | ||
| permissions: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot i dont see why the permission woudl be needed.
explain! or remove if not needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The contents: write permission is required for the release-github job to create GitHub releases. Added inline comment at line 113 explaining this. No other jobs need elevated permissions.
| pkg/*.gem | ||
| checksums/*.sha512 | ||
|
|
||
| - name: Create GitHub Release |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move the "generate github release" to an own job...
publishing a release is nice to have.
maybe run this in parallel to rubygems release, if this is state of the art.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved GitHub release to dedicated release-github job in commit 96a34a4. Both release-github and release-rubygems now run in parallel (both depend on validate and build) for faster completion.
Co-authored-by: jkowalleck <[email protected]>
Release Pipeline Implementation - COMPLETE ✅
All requirements have been successfully implemented and tested.
Implementation Summary
Files Created:
.github/workflows/release.yml- Automated release workflow.github/RELEASE.md- Comprehensive release documentationFiles Modified:
CONTRIBUTING.md- Added automated release process documentation.gitignore- Excluded generated checksums directoryRelease Workflow Architecture
The workflow is split into 5 modular jobs for better separation of concerns:
validatejob:versionandprereleasefor downstream jobstestjob:validatebuildjob:testrelease-githubjob:release-rubygemscontents: writepermission (only job with elevated permissions)validate,buildrelease-rubygemsjob:release-githubvalidate,buildKey Features
v1.2.0,v1.3.0-alpha.1)Requirements Verification ✅
✅ Supports prereleases: Any version tag with content after MAJOR.MINOR.PATCH is automatically detected and marked as prerelease
v1.3.0-alpha.1,v1.2.3.rc1,v2.0.0-beta.2✅ Tags releases in git: Workflow is triggered by version tags which serve as git release tags
✅ GitHub releases with artifacts: Each release includes:
.gemfile).sha512file)Testing & Validation ✅
Documentation ✅
Security Considerations ✅
Fixes #46
Original prompt
💡 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.