|
| 1 | +name: "semver-cli" |
| 2 | +description: "Semver utility action" |
| 3 | +branding: |
| 4 | + icon: activity |
| 5 | + color: orange |
| 6 | +inputs: |
| 7 | + action: |
| 8 | + description: "A versioning action to perform (get|set|inc|parse)" |
| 9 | + required: false |
| 10 | + command: |
| 11 | + type: choice |
| 12 | + description: "The kind of increment (major|minor|patch|none) for (get|inc) actions" |
| 13 | + required: false |
| 14 | + options: |
| 15 | + - none |
| 16 | + - major |
| 17 | + - minor |
| 18 | + - patch |
| 19 | + pre: |
| 20 | + type: boolean |
| 21 | + description: "Whether or not to create a pre-release version (inc|get)" |
| 22 | + name: |
| 23 | + description: "If pre is set, you may optionally specify a prerelease name" |
| 24 | + required: false |
| 25 | + value: |
| 26 | + description: "If pre is set, you may optionally specify a prerelease number" |
| 27 | + build: |
| 28 | + description: "Optional build metadata" |
| 29 | + required: false |
| 30 | + current: |
| 31 | + description: "The version for the set command" |
| 32 | + |
| 33 | +outputs: |
| 34 | + version: |
| 35 | + description: "The resulting version change" |
| 36 | + version_docker: |
| 37 | + description: "The resulting version change formatted to be compatible with docker tags" |
| 38 | + version_dotnet: |
| 39 | + description: "The resulting version change formatted to be compatible with dotnet" |
| 40 | + major: |
| 41 | + description: "If parsing, the major version" |
| 42 | + minor: |
| 43 | + description: "If parsing, the minor version" |
| 44 | + patch: |
| 45 | + description: "If parsing, the patch version" |
| 46 | + prerelease: |
| 47 | + description: "If parsing, the prerelease version" |
| 48 | + build: |
| 49 | + description: "If parsing, the build version" |
| 50 | +runs: |
| 51 | + using: "docker" |
| 52 | + image: "Dockerfile.action" |
| 53 | + args: |
| 54 | + - ${{ inputs.action || 'get' }} |
| 55 | + - ${{ inputs.command }} |
| 56 | + - ${{ inputs.pre && '--pre' || ''}} |
| 57 | + - ${{ inputs.name && '--name' || '' }} |
| 58 | + - ${{ inputs.name || '' }} |
| 59 | + - ${{ inputs.value && '--value' || '' }} |
| 60 | + - ${{ inputs.value || '' }} |
| 61 | + - ${{ inputs.build && '--build' || '' }} |
| 62 | + - ${{ inputs.build || '' }} |
| 63 | + - ${{ inputs.current }} |
0 commit comments