List the directories to check if it actually works #8
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: Create .love file and build to .exe | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
create-love: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Install zip utility | |
run: sudo apt-get install zip -y | |
- name: Create .love file | |
run: | | |
zip -r game.love * | |
mv game.love ${GITHUB_REPOSITORY#*/}-$(date +%Y%m%d%H%M%S).love | |
- name: Upload .love file as artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: love-file | |
path: | | |
*.love | |
convert-love: | |
runs-on: ubuntu-latest | |
needs: create-love | |
steps: | |
- name: Download .love file from previous job | |
uses: actions/download-artifact@v2 | |
with: | |
name: love-file | |
path: . | |
- name: Install zip utility | |
run: sudo apt-get install zip -y | |
- name: Download LOVE.exe | |
run: | | |
mkdir love | |
cd love | |
curl -L -o love-win.zip https://github.com/love2d/love/releases/download/11.5/love-11.5-win64.zip | |
unzip love-win.zip | |
mv love-11.5-win64/* . | |
cd .. | |
- name: Create .exe file | |
run: | | |
ls | |
cp love-11.5-win64/love.exe game.exe | |
cat love-11.5-win64/love.exe ${GITHUB_REPOSITORY#*/}-*.love > game.exe | |
zip -r game.exe love-11.5-win64/love.dll love-11.5-win64/lua51.dll love-11.5-win64/SDL2.dll love-11.5-win64/mpg123.dll | |
- name: Upload .exe file as artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: Game | |
path: | | |
game.exe |