Merge pull request #249 from SpaceWarpDev/sound-api #48
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |