✂️ GitHub action to split string
msg
: String to splitseparator
: The delimiter to split the string. Default:' '
(whitespace)maxsplit
: Maximum number of splits. Default:-1
(no limit)
_0
,_1
, ...,_n
: Each result of a splits- According to metadata syntax of outputs, it has
_
prefix - Currently, support only
100
splits
- According to metadata syntax of outputs, it has
length
: Length of the splits
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 }}