Skip to content

Add rollback job to the release.yml workflow in case of error#914

Merged
MGaetan89 merged 2 commits intomainfrom
904-update-the-releaseyml-workflow-to-support-rollback-in-case-of-error
Mar 3, 2025
Merged

Add rollback job to the release.yml workflow in case of error#914
MGaetan89 merged 2 commits intomainfrom
904-update-the-releaseyml-workflow-to-support-rollback-in-case-of-error

Conversation

@MGaetan89
Copy link
Contributor

Pull request

Description

This PR reworks the release.yml workflow to automate reverting the release when an error occurs.

It now contains four major jobs that run in parallel:

  • Publish packages.
  • Upload to Firebase App Distribution.
  • Create GitHub Release.
  • Publish Documentation.

It also introduces a new "Rollback" job that runs if one of the previous four fails. Its goal is to:

  • Delete the tag that triggered the workflow to run.
  • Delete every package for the current tag from GitHub Packages.
  • Delete the GitHub Release.

Changes made

  • Split the release.yml workflow into multiple independent jobs.
  • Add a rollback job to release.yml to revert most changes in case of an error.
  • Update the quality.yml workflow to run ./gradlew publishToMavenLocal.
  • Update the quality.yml workflow to run ./gradlew :dokkaGenerate.

Checklist

  • APIs have been properly documented (if relevant).
  • The documentation has been updated (if relevant).
  • New unit tests have been written (if relevant).
  • The demo has been updated (if relevant).

@MGaetan89 MGaetan89 self-assigned this Mar 1, 2025
@MGaetan89 MGaetan89 linked an issue Mar 1, 2025 that may be closed by this pull request
@github-project-automation github-project-automation bot moved this to ✏️ Draft in Pillarbox Mar 1, 2025
@MGaetan89 MGaetan89 force-pushed the 904-update-the-releaseyml-workflow-to-support-rollback-in-case-of-error branch from 604a937 to 04b9e2d Compare March 1, 2025 07:55
@github-actions
Copy link

github-actions bot commented Mar 1, 2025

Code Coverage

Overall Project 51.26% 🟢

There is no coverage information present for the Files changed

@MGaetan89 MGaetan89 requested a review from StaehliJ March 1, 2025 08:09
Copy link
Contributor

@StaehliJ StaehliJ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good, another place to not forget when adding a new module to the project but it is fine.

@MGaetan89
Copy link
Contributor Author

Sounds good, another place to not forget when adding a new module to the project but it is fine.

You mean for the removal of packages? There's a feature request to support multiple packages instead of just one: actions/delete-package-versions#65. Someone also suggested supporting regex in the package name. So maybe one day it will be possible to just pass pillarbox-* for the package name.

@MGaetan89 MGaetan89 added this pull request to the merge queue Mar 3, 2025
Merged via the queue into main with commit 30348fc Mar 3, 2025
10 checks passed
@MGaetan89 MGaetan89 deleted the 904-update-the-releaseyml-workflow-to-support-rollback-in-case-of-error branch March 3, 2025 08:57
@github-project-automation github-project-automation bot moved this from ✏️ Draft to ✅ Done in Pillarbox Mar 3, 2025
@MGaetan89 MGaetan89 mentioned this pull request Mar 3, 2025
4 tasks
@MGaetan89
Copy link
Contributor Author

I've added the Publish to Maven local and Generate documentation checks to the list of required checks for a PR to be mergeable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

Update the release.yml workflow to support rollback in case of error

2 participants