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

Changing running branch for semantic release #2704

Open
mehdihadeli opened this issue Feb 8, 2023 · 1 comment
Open

Changing running branch for semantic release #2704

mehdihadeli opened this issue Feb 8, 2023 · 1 comment

Comments

@mehdihadeli
Copy link

mehdihadeli commented Feb 8, 2023

Hi,
I defined possible branches for my releases inner .releaserc.yaml. But because I'm using workflow_run of GitHub action inner my CD workflow, it gives me a default branch for GITHUB_REF GitHub action environment variable, that is not my exactly triggered branch.
Currently, semantic-release works with current branch and GITHUB_REF environment variable.
Is there any way, when I run npx semantic-release, I pass my desired branch for analyzing semantic-release?

branches:
   - main
   - '+([0-9])?(.{+([0-9]),x}).x'
   - name: develop
     prerelease: dev
     channel:  dev
@gund
Copy link

gund commented Mar 31, 2023

+1 to be able to specify the branch via a flag, for example as -b [banch_name].

For now I've achieved the same result by overriding GITHUB_REF env variable when running semantic-release:

GITHUB_REF=next npx semantic-release

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

2 participants