-
Notifications
You must be signed in to change notification settings - Fork 41
/
Copy pathaction.yml
52 lines (49 loc) · 1.66 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
44
45
46
47
48
49
50
51
52
name: 'Install Theos'
description: 'Install Theos and prepare it for building projects'
author: 'Randomblock1'
inputs:
theos-dir:
description: 'Where to install Theos (relative to the repo workspace itself)'
required: false
default: theos
theos-src:
description: 'Where to fetch Theos from (github URL)'
required: false
default: 'https://github.com/theos/theos'
theos-sdks:
description: 'Where to get the SDKs from (github URL)'
required: false
default: 'https://github.com/theos/sdks'
runs:
using: "composite"
steps:
- name: prepare environment
shell: bash
run: |
brew install ldid make
echo "THEOS=$GITHUB_WORKSPACE/${{ inputs.theos-dir }}" >> $GITHUB_ENV
PATH="/usr/local/opt/make/libexec/gnubin:$PATH" >> $GITHUB_ENV
echo "Succesfully installed tools!"
- name: get theos
shell: bash
run: |
if [ ! -d "${{ github.workspace }}/${{ inputs.theos-dir }}" ]; then
git clone ${{ inputs.theos-src }} ${{ github.workspace }}/${{ inputs.theos-dir }} --recursive
echo "Theos successfully obtained!"
else echo "Theos already cached, skipping..."
fi
- name: get sdks
shell: bash
run: |
if [ ! -d "${{ github.workspace }}/${{ inputs.theos-dir }}/sdks" ]; then
cd ${{ github.workspace }}/${{ inputs.theos-dir }}/sdks
curl -sLO ${{ inputs.theos-sdks }}/archive/master.zip
TMP=$(mktemp -d)
7z x master.zip -o$TMP
mv $TMP/*-master/*.sdk $THEOS/sdks
rm -r master.zip $TMP
else echo "Theos SDKs already cached, skipping..."
fi
branding:
icon: download-cloud
color: purple