This action accepts any string, and outputs three different versions of that string:
- camelcase (
hello_world
->helloWorld
) - pascalcase (
hello_world
->HelloWorld
)
You can access the outputted strings through the job outputs context. See docs here
Required The string you want manipulated
Required String separator
Optional Start index (default 0)
Optional End index
inputStr.toPascalCase()
Example: hello_world
-> HelloWorld
inputStr.toCamelCase()
Example: hello-world
-> helloWorld
name: SomeWorkflow
on: [push]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- id: string
uses: H3aven-Labs/[email protected]
with:
string: test-hello-world
separator: "-"
start: 1
- id: step2
run: echo ${{ steps.string.outputs.camelcase }}
- id: step3
run: echo ${{ steps.string.outputs.pascalcase }}
This project is based on https://github.com/ASzc/change-string-case-action