[BRE-1932] Refactor dotnet extensions start-release.yml #280
[BRE-1932] Refactor dotnet extensions start-release.yml #280brandonbiete wants to merge 6 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #280 +/- ##
=======================================
Coverage 68.58% 68.58%
=======================================
Files 51 51
Lines 1184 1184
Branches 104 104
=======================================
Hits 812 812
Misses 325 325
Partials 47 47 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@justindbaur to review -- we need to be prepared for this workflow change. |
Didn't see that Justin was asked to review until after I approved, so I'm dismissing my review so that this PR can't be merged just yet, to give him time.
justindbaur
left a comment
There was a problem hiding this comment.
This workflow doesn't actually do a release, this just starts a code freeze which uses the BW-GHAPP to create release/* branches and make a commit to main for vNext. The release branch action will fail if they can't do it with the Bitwarden bot. If any workflow needs to be updated it is probably pack-and-release.yml. But deploys already defer to the bitwarden/devops repo and requires approval to do the deploy. Right now the approving team has to be Platform or Arch but maybe we could just change the team to BRE.
Thank you for looking into this. I may have over-complicated this migration. Let me check with the team and see if what you've outlined aligns with the new deployment standards. |
After the |
|
@brandonbiete If the concern is the GitHub release creation then honestly we can just delete that, it was largely just done to create a nice commit diff but I can work on something to fill that gap. dotnet-extensions/.github/workflows/pack-and-release.yml Lines 66 to 157 in 53ebbb0 |
Just had a thorough discussion around this with @pixman20 and here's what we plan to do. We are going to pull the logic out from the workflows that handle version bumping and GH releases from this repo to the |
|
For what it's worth, we've been enjoying GitHub Environments for a while now and it helps the team deploy what they need via the approval process built in there. Will that be moving to the repo as well? Would be cool to see Environments scaled out for other releases there too. |
Because the |
125a540 to
74882b0
Compare
|
@justindbaur @dereknance could i have this re-reviewed when you have a chance, thank you! |
justindbaur
left a comment
There was a problem hiding this comment.
Sorry, took me a while to fully understand the flow between this and the deploy PR but I think this is pretty similar and should work. Just a couple minor questions about why some actions were downgraded but otherwise looks good to me.
74882b0 to
acfaa33
Compare
Updates start-release and pack-and-release workflows to use trigger-actions pattern instead of performing operations directly. This centralizes release control in the deploy repo. - Modify start-release.yml to trigger deploy repo via trigger-actions - Modify pack-and-release.yml to trigger deploy repo for release + publish - Remove GitHub release creation (moved to deploy repo) - Remove devops dispatch (replaced with deploy repo trigger) - Remove version bump job (now handled by deploy repo)
acfaa33 to
0c8d80f
Compare
|
Will merge once https://github.com/bitwarden/deploy/pull/132 has been approved as they depend on one another. |
pixman20
left a comment
There was a problem hiding this comment.
This PR looks good, but will need version-bump.yml to be updated first
Security improvement: dotnet-extensions workflows no longer access GitHub App credentials. Changes: - Restored bump-version jobs to start-release.yml and pack-and-release.yml - Refactored version-bump.yml to only calculate changes (no credential access) - Removed Azure/Key Vault/GitHub App token steps - Added TODO (BRE-2027) for upload-modified-files action - Added trigger to deploy repo for version-bump-dotnet-extensions task - Updated architecture documentation with new flow Related PRs in deploy repo will add version-bump-dotnet-extensions.yml workflow.
This doc was added for context during development but should not be committed to the repo.
Uses the new update-repository workflow (BRE-2003) instead of custom version-bump-dotnet-extensions workflow. Changes: - Changed task from 'version-bump-dotnet-extensions' to 'update-repository' - Simplified data payload to just artifact_name and target_branch - Removed package and new_version from data (not needed by generic workflow) - update-repository.yml will handle PR creation and auto-merge This leverages the shared protected-branch update mechanism that: - Opens PR against target branch - Waits for required checks to pass - Auto-merges when checks complete - Works for both main and release/* branches
|
|
@justindbaur Can you please review this PR again. This pipeline has been re-arch'd since you last reviewed. The objective outlines how it flows end-to-end. Let me know if you have any questions. |
justindbaur
left a comment
There was a problem hiding this comment.
Lets go for it, we can do some releases to make sure it all works as expected and figure out any issues.
|
@claude review this |
🤖 Bitwarden Claude Code ReviewOverall Assessment: APPROVE Reviewed the migration of the Code Review DetailsNo blocking findings. The substantive review items (restoring removed steps, switching to the |
|
Claude finished @pixman20's task in 1m 21s —— View job Code Review: PR #280 — Refactor release workflows
I reviewed the three changed workflow files against ✅ Strengths
🟡 Minor / non-blocking1. Unused job outputs — a couple of declared outputs are never consumed by any caller:
These are harmless but are dead declarations. If they're placeholders for a follow-up, a quick comment would help; otherwise they can be dropped. 2. Inconsistent runner version — 3. "prerelease": ${{ inputs.prerelease }}This relies on the Note on
|
|
Approved, see Claude comments for potential improvements separate that could be done separately from this PR. |



🎟️ Tracking
https://bitwarden.atlassian.net/browse/BRE-1932
📔 Objective
This PR migrates
dotnet-extensionsrelease workflows from repo-managed to the centralizeddeployrepo pattern. This enables proper release branch protection by giving only thedeploybot write access to protected branches.What happens when you trigger a release via
start-release,prerelease, andreleaseworkflows:dotnet-extensionsrepo's workflows (start-release.yml,prerelease.yml, orrelease.yml) build the package and uploads artifactsIt calls
trigger-actions@main(composite action) with task name and datadeployrepo'strigger-actions.ymlreceives the deployment event and routes to the appropriate workflowdeployrepo'scut-release-branch-dotnet-extensions.ymlworkflow runs (forstart-release), which:dotnet-extensionsat the current versionrelease/{package}/{major.minor}dotnet-extensions(only bot can do this)deployrepo'srelease-dotnet-extensions.ymlworkflow runs (for prerelease/release), which:run_iddotnet-extensionsat the release branchdotnet-extensionswith the artifacts.nupkgto NuGet (or GitHub Packages for prereleases) via OIDCAfter deploy completes,
dotnet-extensionsrepo's workflow callsversion-bump.yml, which:.csprojfiles as artifactsdeployrepo withtask: update-repositorydeployrepo'supdate-repository.ymlworkflow:🚨 Breaking Changes