semantic-release-action icon indicating copy to clipboard operation
semantic-release-action copied to clipboard

Multibranch pre-release fails

Open adityagesh opened this issue 2 years ago • 0 comments

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.

adityagesh avatar Jan 20 '22 16:01 adityagesh