Github Action: Make a string lowercase, uppercase, or capitalized
Go to file
dependabot[bot] ccb130a4e4 Bump undici from 5.28.3 to 5.28.4
Bumps [undici](https://github.com/nodejs/undici) from 5.28.3 to 5.28.4.
- [Release notes](https://github.com/nodejs/undici/releases)
- [Commits](https://github.com/nodejs/undici/compare/v5.28.3...v5.28.4)

---
updated-dependencies:
- dependency-name: undici
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-05 10:22:10 -06:00
node_modules npm install 2023-10-25 14:27:07 -06:00
.gitignore Add back in node_modules, updated 2022-11-03 10:55:07 -06:00
action.yml Update node version 2023-10-25 14:17:29 -06:00
index.js Fix capitalized not lowercasing the tail 2020-07-29 10:31:26 -06:00
LICENSE Initial version 2020-07-29 10:10:10 -06:00
package-lock.json Bump undici from 5.28.3 to 5.28.4 2024-04-05 10:22:10 -06:00
package.json Update dependencies 2023-10-25 14:26:52 -06:00
README.md Update README.md 2024-01-31 08:35:21 -07:00

Change String Case GitHub Action

This action accepts any string, and outputs three different versions of that string:

  • lowercase (XyZzY -> xyzzy)
  • uppercase (XyZzY -> XYZZY)
  • capitalized (Xyzzy -> Xyzzy)

You can access the outputted strings through the job outputs context. See docs here, or the Example Usage section below.

Inputs

string

Required The string you want manipulated

Outputs

lowercase

inputStr.toLowerCase()

Example: XyZzY -> xyzzy

uppercase

inputStr.toUpperCase()

Example: XyZzY -> XYZZY

capitalized

inputStr.charAt(0).toUpperCase() + inputStr.slice(1).toLowerCase()

Example: XyZzY -> Xyzzy

Example Usage

name: SomeWorkflow
on: [push]
jobs:
  build:
    name: Build
    runs-on: ubuntu-latest
    steps:
      - id: string
        uses: ASzc/change-string-case-action@v6
        with:
          string: XyZzY
      - id: step2
        run: echo ${{ steps.string.outputs.lowercase }}