release-drafter / release-drafter

Drafts your next release notes as pull requests are merged into master.
https://github.com/marketplace/actions/release-drafter
ISC License
3.4k stars 327 forks source link

[Question] Is it possible to change the target branch of the drafted release? #884

Closed malimccalla closed 2 years ago

malimccalla commented 3 years ago

Hi, I have this basic config set up:

 # Drafts our next Release notes as Pull Requests are merged into "master" 
 - name: Release Drafter
   uses: release-drafter/release-drafter@v5
   env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

On this project, the default branch is staging. However, when releases are created we need to release them from the master branch. By default when the release drafted it points to staging as it's our default git branch. This can be problematic as it's easy to forget to change the dropdown from staging to master before deploying, Is there any way to change this target value in the config?

Screenshot 2021-06-04 at 19 00 48
jetersen commented 2 years ago

Yes https://github.com/release-drafter/release-drafter#action-inputs via commitsh

  - name: Release Drafter
    uses: release-drafter/release-drafter@v5
    with:
      commitsh: staging
    env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}