-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
44 lines (43 loc) · 1.46 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: 'Invoke SimpleLocalize CLI command'
description: 'Manage localization files with SimpleLocalize Github Action'
author: "SimpleLocalize"
branding:
icon: 'globe'
color: 'blue'
inputs:
command:
description: 'Choose a CLI command to execute. Commands: https://simplelocalize.io/docs/cli/get-started/'
required: true
default: 'status'
cli-version:
description: 'Choose a CLI version. Versions: https://github.com/simplelocalize/simplelocalize-cli/releases'
required: true
default: '2.6.0'
api-key:
description: 'Project API Key'
required: false
default: ''
args:
description: 'Custom arguments for the CLI command'
required: false
default: ''
runs:
using: 'composite'
steps:
- name: "Setup Java"
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '20'
- name: "Print inputs"
run: |
echo "command: ${{ inputs.command }}"
echo "cli-version: ${{ inputs.cli-version }}"
echo "args: ${{ inputs.args }}"
shell: bash
- name: "Download SimpleLocalize CLI"
run: "curl -o simplelocalize.jar https://get.simplelocalize.io/binaries/${{ inputs.cli-version }}/simplelocalize-cli-${{ inputs.cli-version }}.jar"
shell: bash
- name: "Execute SimpleLocalize CLI Command"
run: "java -jar simplelocalize.jar ${{ inputs.command }} ${{ inputs.api-key && '--apiKey' }} ${{ inputs.api-key }} ${{ inputs.args }}"
shell: bash