Merge pull request #6 from Chilly5/auto-vills #35
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: Build and Deploy to itch.io | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| build-webgl: | |
| name: Build WebGL & Deploy | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/cache@v4 | |
| with: | |
| path: Open Empires/Library | |
| key: Library-WebGL-${{ hashFiles('Open Empires/Assets/**', 'Open Empires/Packages/**', 'Open Empires/ProjectSettings/**') }} | |
| restore-keys: | | |
| Library-WebGL- | |
| - uses: game-ci/unity-builder@v4 | |
| env: | |
| UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} | |
| UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} | |
| UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }} | |
| with: | |
| projectPath: Open Empires | |
| unityVersion: 6000.3.14f1 | |
| targetPlatform: WebGL | |
| buildName: OpenEmpires | |
| - name: Install butler | |
| run: | | |
| curl -L -o butler.zip https://broth.itch.zone/butler/linux-amd64/LATEST/archive/default | |
| unzip butler.zip | |
| chmod +x butler | |
| ./butler -V | |
| - name: Deploy to itch.io | |
| env: | |
| BUTLER_API_KEY: ${{ secrets.BUTLER_CREDENTIALS }} | |
| run: | | |
| ./butler push build/WebGL/OpenEmpires ${{ vars.ITCH_USER }}/${{ vars.ITCH_GAME }}:html5 | |
| - uses: game-ci/unity-return-license@v2 | |
| if: always() |