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

Multibranch pre-release fails #90

Open
adityagesh opened this issue Jan 20, 2022 · 0 comments
Open

Multibranch pre-release fails #90

adityagesh opened this issue Jan 20, 2022 · 0 comments

Comments

@adityagesh
Copy link

Describe the bug
When branch is selected using negative glob pattern, all matching branches seems to be considered
image

Workflow

 semver:
    name: Semver
    runs-on: ubuntu-latest
    if: ${{ github.event_name == 'push' }}
    needs: test
    outputs:
      new_release_version: ${{ steps.semantic.outputs.new_release_version }}
    steps:
    - name: Checkout
      uses: actions/checkout@v2
    - name: Extract branch name
      shell: bash
      run: echo "##[set-output name=branch;]$(echo pre-$(echo ${GITHUB_REF##*/} | cut -c1-10))"
      id: extract_branch
    - name: Semantic Release
      uses: cycjimmy/semantic-release-action@v2
      id: semantic
      with:
        semantic_version: 18
        branches: |    
          [
          'main', 
          {
            name: '!main', 
            prerelease: '${{ steps.extract_branch.outputs.branch }}'
          },
          ]
        dry_run: true
        extra_plugins: |
          @semantic-release/changelog@6
      env:
          GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }}
    - name: Semantic Version
      if: steps.semantic.outputs.new_release_published == 'true'
      run: |
        echo ${{ steps.semantic.outputs.new_release_version }}

Expected behavior
Version generated for the specific branch which triggered the action

Additional context
Add any other context about the problem here.

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

1 participant