Skip to content
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

feat(pdm): failsafe PDM release (failsafe steps and cleanup on failure) #188

Merged
merged 1 commit into from
Apr 19, 2024

Conversation

noirbizarre
Copy link
Member

@noirbizarre noirbizarre commented Apr 18, 2024

This PR make the pdm/release action more secure and avoid ending in an unstable state:

  • not pushing the tag is considered a failure
  • steps relying on CI-only credentials are considered critical (gemfury, nexus, docker):
    • can only be executed from CI
    • a release is considered failed as soon as one of them fail
    • they must be cleaned in the workflow (because they require credentials)
  • documentation failure does not stop the release, as it can be published later from anybody with repository permissions
  • GitHub release publication failure does not stop the process as it can be manually crafted after
  • summary steps are should never make the workflow fail

On failure:

  • docker image is deleted if any
  • GemFury package is deleted if any
  • Nexus package is deleted if any
  • Tag Documentation is deleted if any
    Those removals are added to the workflow summary.

In case of successful release but with failed steps, those can be manually repaired:

  • documentation can be published by checking out the tag and executing pdm doc:deploy --push <tag>
  • GitHub release can be created from the tag by copy-pasting the version changelog from CHANGELOG.md

With this, there should be o more partial release with manual cleanup to do.

noudin-ledger
noudin-ledger previously approved these changes Apr 19, 2024
@noirbizarre noirbizarre merged commit 5d076c8 into main Apr 19, 2024
5 checks passed
@noirbizarre noirbizarre deleted the feature/pdm-release-cleanup-on-failure branch April 19, 2024 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants