tmp workaround #20
This file contains hidden or 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: Package Game | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| on: | |
| workflow_dispatch: {} | |
| push: | |
| branches: | |
| - 'master' | |
| jobs: | |
| build-linux: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check-out repository | |
| uses: actions/checkout@v3 | |
| with: | |
| path: "./Game/Data" | |
| - name: install dep and finishing up | |
| run: | | |
| sudo apt-get install python3 python3-venv | |
| cd Game/Data | |
| python3 -m venv venvFolder | |
| venvFolder/bin/python3 -m pip install -r requirements.txt | |
| venvFolder/bin/python3 -m pip install pyinstaller | |
| venvFolder/bin/pyinstaller executeMe.py | |
| cd ../../ | |
| mkdir OfMiceAndMechs | |
| mkdir OfMiceAndMechs/internal/ | |
| cp -r Game/Data/dist/executeMe/* OfMiceAndMechs/internal/ | |
| cp -r Game/Data/scaled_* OfMiceAndMechs/internal/ | |
| cp -r Game/Data/data/ OfMiceAndMechs/internal/ | |
| cp -r Game/Data/config/ OfMiceAndMechs/internal/ | |
| cp -r Game/Data/README.md OfMiceAndMechs/internal/ | |
| cp -r Game/Data/sounds/ OfMiceAndMechs/internal/ | |
| echo "cd internal" > OfMiceAndMechs/launch_game.sh | |
| echo "./executeMe" >> OfMiceAndMechs/launch_game.sh | |
| chmod +x OfMiceAndMechs/launch_game.sh | |
| tar -czf OfMiceAndMechs-Linux.tar.gz OfMiceAndMechs | |
| # - name: Upload Artifacts | |
| # uses: actions/upload-artifact@v4 | |
| # with: | |
| # name: OfMiceAndMechs-Linux | |
| # path: | | |
| # /Game/* | |
| # compression-level: 9 | |
| - name: Create Release | |
| run: | | |
| cp ./OfMiceAndMechs-Linux.tar.gz Game/Data/ | |
| cd Game/Data/ | |
| revision="$(git rev-parse --short HEAD)" | |
| gh release create Dev-$revision ./OfMiceAndMechs-Linux.tar.gz --generate-notes --latest || gh release upload Dev-$revision ./OfMiceAndMechs-Linux.tar.gz | |