Skip to content

Commit

Permalink
Merge pull request #77 from drashland/add-release-drafter
Browse files Browse the repository at this point in the history
[add-release-drafter] add release drafter ci
  • Loading branch information
ebebbington authored Sep 22, 2020
2 parents a2f7aa9 + a5b0efa commit 38d5855
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 0 deletions.
57 changes: 57 additions & 0 deletions .github/release_drafter_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name-template: 'v$RESOLVED_VERSION'
tag-template: 'v$RESOLVED_VERSION'

# Used to group together pull requests. See the docs for more info, but we don't need this as we have our own custom format
#categories:
# - title: '🚀 Features'
# labels:
# - 'feature'
# - 'enhancement'
# - title: '🐛 Bug Fixes'
# labels:
# - 'fix'
# - 'bugfix'
# - 'bug'
# - title: '🧰 Maintenance'
# label: 'chore'

change-template: '- $TITLE (#$NUMBER)'

# Only add to the draft release when a PR has one of these labels
include-labels:
- 'major'
- 'minor'
- 'patch'
- 'chore'

# Here is how we determine what version the release would be, by using labels. Eg when "minor" is used, the drafter knows to bump up to a new minor version
version-resolver:
major:
labels:
- 'major'
minor:
labels:
- 'minor'
patch:
labels:
- 'patch'
- 'chore' # allow our chore PR's to just be patches too
default: patch

# What our release will look like. If no draft has been created, then this will be used, otherwise $CHANGES just gets addedd
template: |
__Compatibility__
* Requires Deno v<DENO_VERSION> or higher
* Uses Deno std@<STD_VERSION>
__Importing__
* Import this latest release by using the following in your project(s):
```typescript
import { Sockets } from "https://deno.land/x/sockets@v$RESOLVED_VERSION/mod.ts";
```
__Updates__
$CHANGES
19 changes: 19 additions & 0 deletions .github/workflows/release_drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Release Drafter

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

jobs:
update_release_draft:
runs-on: ubuntu-latest
steps:
# Drafts your next Release notes as Pull Requests are merged into "master"
- uses: release-drafter/release-drafter@v5
with:
# (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
config-name: release_drafter_config.yml
env:
GITHUB_TOKEN: ${{ secrets.CI_USER_PAT }}

0 comments on commit 38d5855

Please sign in to comment.