-
Notifications
You must be signed in to change notification settings - Fork 41
/
Copy pathaction.yml
41 lines (39 loc) · 1.31 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
name: 'Install Theos'
description: 'Install Theos and prepare it for building projects'
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
echo "PATH=$PATH:/usr/local/opt/make/libexec/gnubin" >> $GITHUB_ENV
echo "Succesfully installed tools!"
- name: get theos
shell: bash
run: |
git clone ${{ inputs.theos-src }} ${{ github.workspace }}/${{ inputs.theos-dir }} --recursive
echo "Theos successfully obtained!"
- name: get sdks
shell: bash
run: |
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