-
Notifications
You must be signed in to change notification settings - Fork 38
46 lines (38 loc) · 1.22 KB
/
build_spacewarp.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
name: SpaceWarp Builder
on:
push:
branches: [ "main", "dev" ]
pull_request:
branches: [ "main", "dev" ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
run_args: ["" , "-r"]
steps:
- name: Check Out Repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: 3.9
- name: Run Python Script
run: sudo python builder.py ${{ matrix.run_args }}
# I'm sure running it in sudo will cause NO issues what so ever.
- name: Find Zip
id: find-zip
run: |
if [ "${{ matrix.run_args }}" == "-r" ]; then
echo "zip=$(ls -1 build/SpaceWarp-Release*.zip | head -n 1)" >> $GITHUB_ENV
echo "artifact_name=SpaceWarpRelease" >> $GITHUB_ENV
else
echo "zip=$(ls -1 build/SpaceWarp-Debug*.zip | head -n 1)" >> $GITHUB_ENV
echo "artifact_name=SpaceWarpDebug" >> $GITHUB_ENV
fi
# Least cursed Sinon code.
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: ${{ env.artifact_name }}
path: ${{ env.zip }}