MarcoIeni / release-plz

Publish Rust crates from CI with a Release PR.

Home Page:https://release-plz.ieni.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

add `release-plz init` command

MarcoIeni opened this issue · comments

Motivations

Onboarding is difficult: people need to read the docs to learn how to set up the GitHub action.
Let's change that!

Solution

Add a release-plz init command to prompt the user and guide them through the onboarding.
It only works if it detects a GitHub repository or no remote is set.

The command will:

  1. ask the user to copy paste their cargo registry token, tell them that if they don't have it, they can create one at this link: https://crates.io/settings/tokens/new explaining what options are required. After they paste the token and hit enter, release-plz sets the cargo registry token in github actions secret
  2. ask the user if they want to create a PAT (link to the release-plz github actions section) and set the secret in GitHub actions.
  3. write to file system the release-plz.yml file

How do we set github actions secrets with the rest api?

here

why this name?

The name comes from cargo init.

Tasks

  • detect default branch and use that one instead of main

implemented in #1350