Skip to content

Proposal: automate workflow with GitHub Actions #32

@lucasbento

Description

@lucasbento

Introduction

This is a proposal to automate the workflow of generating diffs (for rn-diff-purge and upgrade-helper) when creating new releases, work that's currently relying solely on @pvinis.

The Core of It

This proposal is to automate all the manual process with GitHub Actions, here's how we can do it:

In react-native main repository

  1. Add a small GitHub Action to the main react-native repo to trigger a dispatch_event on new tags to @react-native-community/rn-diff-purge, this should also carry over the tag version, example of this can be seen here.

In rn-diff-purge

  1. Get the version param from the dispatch event in a GitHub Action;
  2. Create a branch (e.g. 0.62.0-rc.5) and push it (should be done on top of the last release branch);
  3. Create and checkout to a staging branch (e.g. 0.62.0-rc.5-staging);
  4. Do a react-native init/@react-native-community/cli init (pls halp);
  5. Commit all the changes to staging branch and push it;
  6. Create PR from staging branch (0.62.0-rc.5-staging) to tag branch (0.62.0-rc.5);
  7. This PR needs to be reviewed, approved and merged by a maintainer;
  8. After the PR is merged the diff is automatically shown on upgrade-helper and used in the CLI.

If any of the automatically-handled steps fail, create an issue on rn-diff-purge mentioning that the process failed and tag maintainers.

Pros

  • We can double-check the diff before it hits upgrade-helper;
  • Will run as soon as there's a new tag in react-native repository.

Discussion points

  • How to handle the RELEASES file in this scenario? updating it will require two PRs, perhaps having another GitHub action to see that a PR was a merged then update the file automatically? 🤔

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions