Skip to content

winterjung/split

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

Split

Actions Status

✂️ GitHub action to split string

Inputs

  • msg: String to split
  • separator: The delimiter to split the string. Default: ' ' (whitespace)
  • maxsplit: Maximum number of splits. Default: -1 (no limit)

Outputs

  • _0, _1, ..., _n: Each result of a splits
  • length: Length of the splits

Example

name: split example
jobs:
  example:
    runs-on: ubuntu-latest
    steps:
      - uses: winterjung/split@v2
        id: split
        with:
          msg: '/release split v1.0.0'

      - name: release package
        if: steps.split.outputs._0 == '/release'
        uses: actions/create-release@latest
        with:
          release_name: Release ${{ steps.split.outputs._1 }}
          tag_name: ${{ steps.split.outputs._2 }}

MIT license