Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#20 - Document the Release Drafter GitHub Action #23

Merged
merged 1 commit into from
Nov 21, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 40 additions & 1 deletion .github/release-drafter.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@ This page provides some usage information.

== Usage

=== Enabling Release Drafter in a repository
Release drafter can be used as a GitHub Application or as a GitHub action.
It is up to the plugin maintainers to chose the way how they use Release Drafter.
The only notable difference is that GitHub Application does not produce logs which would be available to plugin maintainers,
and hence it might be difficult to troubleshoot errors if they occur.

=== Enabling Release Drafter GitHub App in a repository

NOTE: Release Drafter requires full write, because GitHub does not offer a limited scope for only writing releases.
**Don't install Release Drafter to your entire GitHub account — only add the repositories you want to draft releases on.**
Expand All @@ -22,6 +27,40 @@ In the Jenkins organization we recommend using the GitHub app at the moment.
* If you have an Admin access to the GitHub repo, you can just configure the application on https://github.com/apps/release-drafter
* Otherwise, create an INFRA ticket with `component=github` for enabling Release Drafter in the repo

=== Enabling Release Drafter GitHub Action in a repository

It is possible to use a standard Release Drafter as a GitHub action, see the documentation link:[here].
For Jenkins there is also a link:https://github.com/oleg-nenashev/jenkins-release-drafter[oleg-nenashev/jenkins-release-drafter] fork which includes some fixes which have not been released in upstream yet.

Sample configuration:

```yaml
# Automates creation of Release Drafts using Release Drafter
# More Info: https://github.com/jenkinsci/.github/blob/master/.github/release-drafter.adoc
name: Release Management

on:
push:
# branches to consider in the event; optional, defaults to all
branches:
- master

jobs:
update_draft_release:
runs-on: ubuntu-latest
steps:
# Drafts your next Release notes as Pull Requests are merged into "master"
- uses: oleg-nenashev/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```

Examples:

* Official Release drafter: link:https://github.com/jenkinsci/bitbucket-branch-source-plugin/blob/master/.github/workflows/release-management.yml[BitBucket Branch Source Plugin]
* Customized Release Drafter: link:https://github.com/jenkinsci/gradle-plugin/blob/master/.github/workflows/release-drafter.yml[Gradle Plugin]


=== Configuring Release Drafter

After enabling the application, it needs to be configured in `.github/release-drafter.yml` in the master branch of your repository.
Expand Down