Skip to content

Latest commit

 

History

History
77 lines (61 loc) · 3.19 KB

docs.md

File metadata and controls

77 lines (61 loc) · 3.19 KB
name description author tags containerImage containerImageUrl url
Ready release go 🚀
Plugin for semi-automated releases.
Woodpecker Authors
git
release
woodpeckerci/plugin-ready-release-go

Introduction

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.

A Woodpecker workflow file could look like this:

steps:
  release-helper:
    image: woodpeckerci/plugin-ready-release-go
    settings:
      # release_branch: 'custom-release-branch' # default: CI_REPO_DEFAULT_BRANCH
      git_email: <email>
      forge_token:
        from_secret: GITHUB_TOKEN

when:
  event: push
  branch: ${CI_REPO_DEFAULT_BRANCH}

Features

  • Create automated changelog based on PRs which updates itself after each merge to the default branch
  • Auto-categorization of PRs based on labels
  • Automatically determines the next semver version using the PR labels
  • Supports any kind of programming language, changelog tool and commit style
  • Allows to execute custom hooks like pre, post-release

Settings

There are two parts to configure the plugin:

1. Most basic options can be configured via plugin settings

Settings Default Description
FORGE_TYPE CI_FORGE_TYPE The forge type we connect to (github, gitea, ...)
FORGE_URL CI_FORGE_URL The url of the forge
FORGE_TOKEN none The token to connect to the forge
GIT_EMAIL none The email to use for git commits
RELEASE_BRANCH CI_REPO_DEFAULT_BRANCH The branch used to merge the changelog to
PULL_REQUEST_BRANCH_PREFIX next-release/ The prefix used for release pull-request branches
DEBUG false Enable debug logging
RELEASE_PREFIX 🎉 Release Prefix of the PR title

2. Using a release-config.ts file in your repository

Add a release-config.ts file to the root of your repository. Have a look at the UserConfig type for all available options.

export default {
  commentOnReleasedPullRequests: true,
};

The plugin also supports executing custom hooks which can e.g. help to perform additional actions during a release (e.g. updating a helm chart's appVersion field):

export default {
  beforePrepare: async ({ exec, nextVersion }) => {
    await exec(`sed -i "s/^version:.*$/version: ${nextVersion}/g" Chart.yaml`);
  },
};