misskey-dev / release-manager-actions

GitHub Actions workflows for release management of the repository.
MIT License
3 stars 2 forks source link

Release Manager

GitHub Actions workflows for release management of the repository.

Flow

Changes since this image was created:

Installation

1. Variable(s) to set

2. workflows you should copy

Copy and use these workflows.

ⅰ. release-with-dispatch.yml (Release Manager [Dispatch])

The core workflow that is manually triggered. It has three functions:

  1. Prepare release - create PR and alpha.0 tag
  2. Issue a pre-release version during the release process
  3. Issue a release candidate, when you check Start Release Candidate
  4. Issue a stable release and merge PR, when you check MERGE RELEASE BRANCH TO MAIN

ⅱ. release-edit-with-push.yml

This workflow changes the description of the PR when CHANGELOG.md is changed.

You must modify line#6 with the default (develop) branch.

ⅲ. release-with-ready.yml

Release rc when PR becomes ready for review.

3. Create a GitHub App

You must create a GitHub App with following settings and set RELEASE_APP_ID and RELEASE_APP_PRIVATE_KEY as secrets.

Please execute following installation: https://github.com/actions/create-github-app-token/tree/v1/?tab=readme-ov-file#usage

App Settings
Webhook
Active disabled
Repository permission
Contents Read and Write
Pull requests Read and Write

Open Install App tab and install to the repository or whole the user/organization.

Then set USE_RELEASE_APP as true as a repository variable.

4. Create a ruleset to protect the stable branch

To maintain the integrity of the stable branch, it is recommended that it prohibit push by ruleset.

New Branch Ruleset
Enforcement status Active
Bypass list
+ Add bypass GitHub App you created and installed
Targets
Target branches stable
Branch protections
Restrict creations Enable
Restrict updates Enable
Restrict deletions Enable
Require a pull request before merging Enable
Required approvals 1
Block force pushes Enable

Repository secrets and variables

Secrets

RELEASE_APP_ID (optional)
See "If you have `on: release` workflows..."
RELEASE_APP_PRIVATE_KEY (optional)
PEM cert. See "If you have `on: release` workflows..."

Variables

STABLE_BRANCH
Name of the stable branch targeted by the release PR. **Required.**
PACKAGE_JSONS_TO_REWRITE (optional)
package.jsons to rewrite version
e.g. "package.json" "packages/misskey-js/package.json"
INDENT (required when PACKAGE_JSONS_TO_REWRITE be set)
Indent type of package.json.
tab or number of spaces
USE_RELEASE_APP
See "If you have `on: release` workflows..."