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

Allow main as default branch #125

Closed
nickmccurdy opened this issue Sep 26, 2022 · 3 comments
Closed

Allow main as default branch #125

nickmccurdy opened this issue Sep 26, 2022 · 3 comments

Comments

@nickmccurdy
Copy link
Contributor

Describe the bug
See semantic-release/semantic-release#1581

Workflow
N/A

Expected behavior
Repository with main branch is released automatically.

Additional context
Repository with main branch is not released automatically.

@cycjimmy
Copy link
Owner

I still think it should stay the same as the semantic-release configuration for now.
And we can manually add the main branch to the workflow file to meet our needs.
For example:

steps:
  - name: Semantic Release
    uses: cycjimmy/semantic-release-action@v3
    with:
      branches: |    
        [
          '+([0-9])?(.{+([0-9]),x}).x',
          'master', 
          'main', 
          'next', 
          'next-major', 
          {
            name: 'beta', 
            prerelease: true
          }, 
          {
            name: 'alpha', 
            prerelease: true
          }
        ]
...

@kddsultan
Copy link

@cycjimmy,

Does the above config release prerelease for main?

@adrianschmidt
Copy link

Does the above config release prerelease for main?

No, that config would create a regular release on either main or master. But if you have both a main and a master branch, semantic-release should detect that there are two existing branches on which the same release could potentially be created, and refuse to create a 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

4 participants