Skip to content

Automatically creates release pull-request which when merged will trigger a release

License

Notifications You must be signed in to change notification settings

woodpecker-ci/plugin-ready-release-go

Repository files navigation

Ready release go 🚀

This plugin can be executed on every push to your release branch (e.g. default branch) and will create a new release pull-request with an updated changelog as preparation for the next release. After merging the "release"-pull-request, a new release / tag will be created for you.

Usage

Woodpecker CI

Create a new workflow like .woodpecker/release-helper.yml:

when:
  event: push
  branch: ${CI_REPO_DEFAULT_BRANCH}

steps:
  release-helper:
    image: woodpeckerci/plugin-ready-release-go:<version>
    settings:
      git_email: [email protected]
      forge_token:
        from_secret: GITHUB_TOKEN
      # release_branch: 'custom-release-branch' # default: main
      # pull_request_branch_prefix: 'next-release/'
      # debug: true

Configuring PR label categorization

The plugin automatically categorizes every pull-request based on it's labels. The default labels are defined here. To change it, create a release-config.ts at the repository root and overwrite the changeTypes property:

export default {
  changeTypes: [
    {
      // CUSTOM LABEL CONFIG HERE
    },
  ],
};

Workflow

  1. Setup ready-release-go on your repository by adding a config file and a workflow file
  2. On every push to your default branch a pull-request will be created and updated
  3. You can review the pull-request and merge it when you are ready
  4. The plugin will create a new release

Internal workflow

  • get latest release => tag
  • get all commits since commit of last tag
  • get all prs of those commits (if they have a pr associated)
  • get all labels of those prs
  • get next version based on labels of PRs
  • get changelog based on labels of PRs

Roadmap

  • Automatically create release pull-request
  • Automatically update release pull-request
  • Create a release / tag after "release"-pull-request got merged
  • Handle -rc versions
  • Support first release (no previous tags)
  • Support defining next version manually (can be done by changing the version on the release pull-request title / commit message)
  • Support more forges:
    • Github
    • Gitea
    • Forgejo (via gitea api client)
    • Gitlab
    • Bitbucket

Credits

This plugin is heavily inspired by release-drafter and shipjs. Thanks for the great work! Compared to the mentioned tools ready-release-go is not requiring a npm package and can be used with any kind of programming language, changelog tool and commit style.

About

Automatically creates release pull-request which when merged will trigger a release

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages