release-drafter: Complains about missing template
I tried v5 and v5.11.0.
on develop (with develop as default branch)
name: Release Drafter
on:
push:
branches:
- develop
jobs:
update_release_draft:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Draft Release
uses: release-drafter/release-drafter@v5.11.0
with:
config-name: .github/release-drafter.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}


(And I have tried the same on master branch as well.)
release-drafter.yml
name-template: "v$RESOLVED_VERSION š"
tag-template: "v$RESOLVED_VERSION"
categories:
- title: "⨠Features"
labels:
- "feature"
- "enhancement"
- title: "š Bug Fixes"
label: "fix"
- title: "š Documentation"
label: "docs"
- title: "ā
Tests"
label: "docs"
- title: "š§° Maintenance"
labels:
- "chore"
- "ci"
- "refactor"
- "build"
- "revert"
change-template: "- $TITLE @$AUTHOR (#$NUMBER)"
template: |
## Changes
$CHANGES
These are some of the other configs I tried but I get the same error everytime.
without custom config
name: Release Drafter
on:
push:
branches:
- develop
jobs:
update_release_draft:
runs-on: ubuntu-latest
steps:
- name: Draft Release
uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
on master (master default branch)
name: Release Drafter
on:
push:
branches:
- master
jobs:
update_release_draft:
runs-on: ubuntu-latest
steps:
- name: Draft Release
uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 15 (4 by maintainers)
The behavior of only looking for config files in the
defaultbranch is a bit confusing when trying to introduce this action via a new pull request, since the new functionality canāt actually be tested.For anyone trying to get this working on a feature branch: AFAIK there is no way to do so; this action only works when the config file exists under
.githubin the default branch.@BatmanAoD This is odd behavior and to me doesnāt pass the āWTF testā. I wouldnāt expect a config file to be pulled from another branch for the reason you describe OR for modifying the template via pull request and testing it out before mergingā¦
@tapsboy Inside your
.githubrepo it should be under the path.github/release-drafter.ymlNowadays you donāt even need a
.github/release-drafter.ymlwith_extends: .githubit should pick it up by default.Basically it should allow you to use release-drafter without having to plaster a config file in every repo when using
.githubrepo with a file inside.github/release-drafter.ymlIāve run into the same problem but in my case Iāve got a (private but thatās unimportant) repository with
mainas the default branch. However, release-drafter seems to look for the config on the branch calledmaster.Since it becomes rather common for projects to make the switch to
mainand even GitHub has it on their roadmap to make it their default for new repos going forward, it only makes sense to support config files that are located on other branches!In the code it seems that the config is being loaded here but I was unable to trace where
contextcomes from or what it does when calling thecontext.configfunction.I met the same problem. Hope you have solution soon!