-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
42 lines (37 loc) · 1.35 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
name: 'Setup Playdate SDK'
description: 'Setup the Playdate SDK and expose its build tools'
branding:
color: yellow
icon: loader
inputs:
quiet:
description: 'Quiet mode, suppresses non-error output'
default: 'false'
required: true
sdk_version:
description: 'Specify the version of the SDK (defaults to latest)'
default: 'latest'
required: true
set_env_var:
description: 'Set PLAYDATE_SDK_PATH environment variable (default)'
default: 'true'
required: true
update_path:
description: 'Update environment variable PATH for workflow if true (default)'
default: 'true'
required: true
runs:
using: "composite"
steps:
- name: 'Setup Playdate SDK'
shell: bash
run: |
curl -s https://download.panic.com/playdate_sdk/Linux/PlaydateSDK-${{ inputs.sdk_version }}.tar.gz -L | tar ${{ inputs.quiet == 'true' && 'xzf' || 'xvzf' }} - -C ${{ runner.temp }}
- name: 'Set PLAYDATE_SDK_PATH environment variable'
shell: bash
if: ${{ inputs.set_env_var == 'true' }}
run: echo "PLAYDATE_SDK_PATH=${{ runner.temp }}/$(ls -t -U ${{ runner.temp }} | grep -m 1 "PlaydateSDK")" >> $GITHUB_ENV
- name: 'Update PATH'
shell: bash
if: ${{ inputs.update_path == 'true' }}
run: echo "${{ runner.temp }}/$(ls -t -U ${{ runner.temp }} | grep -m 1 "PlaydateSDK")/bin" >> $GITHUB_PATH