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

Example GitHub Action workflow for multiple branches #723

Open
Benwick91 opened this issue Dec 3, 2020 · 4 comments
Open

Example GitHub Action workflow for multiple branches #723

Benwick91 opened this issue Dec 3, 2020 · 4 comments

Comments

@Benwick91
Copy link

Hey,

I know these question comes very often, but is there a way and an example of a .yml file for the usage in Github Action and multiple branches?
My use case:
feature-branches
develop
staging for beta testing
master for release

The action will be triggered when merging staging into master.

But this doesn't work in all use cases.

For example:
feature --> PR for Release Notes --> develop --> staging --> master: PR is in Release Notes. Perfect

Another example

  1. feature1 --> PR for Release Notes --> develop --> staging
    But before Releasing:

  2. feature2 --> PR for Release Notes --> develop

  3. staging --> master: feature1 is included in Release Notes. Great.

  4. develop --> staging --> master: In the PR Commits from staging to Master the feature2 is involved but in the Release notes the feature2 is missing.

Is there a way to make it work so that PRs which are merged before a release to develop are included in the next release?

Thank you!

@Benwick91 Benwick91 changed the title Example Workflow for multiple branch Systems Example GitHub Action workflow for multiple branches Dec 3, 2020
@rizalgowandy
Copy link

Any idea of how to do this thing?

@mkurz
Copy link
Contributor

mkurz commented Mar 25, 2021

I am pretty sure you can solve this with the filter-by-commitish config. I wrote a little guide how to make things work, specially how to see and update the target_commitish value of a GitHub release (found at the end of my post): #656 (comment)

@ssbarnea
Copy link
Contributor

ssbarnea commented Dec 9, 2023

While I have being a happy user of release drafter for a good number of years, I was unable to find a way to make it work for projects that do keep maintenance branches.

If someone can point me to such a project I would be grateful.

@jetersen
Copy link
Member

This does it somewhat nicely by simply extending release drafter with it's own functions:
https://github.com/jenkins-infra/github-reusable-workflows/blob/main/.github/workflows/maven-cd.yml

By simply using a few lines of bash: https://github.com/jenkins-infra/jenkins-maven-cd-action/blob/master/run.sh#L15-L16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants