Itch.io Deploy #5
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: Itch.io Deploy | |
on: | |
workflow_run: | |
workflows: ["Unit Tests"] | |
types: [completed] | |
branches: [edge, prod] | |
jobs: | |
export-windows: | |
if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
name: Windows Export | |
runs-on: ubuntu-20.04 | |
container: | |
image: barichello/godot-ci:4.2.2 | |
environment: Godot Dev Env | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
lfs: true | |
- name: Issue 120 | |
run: | | |
mkdir -p /github/home/.config/godot | |
cp /root/.config/godot/editor_settings-4.tres /github/home/.config/godot/ | |
- name: Sanity check | |
run: ls /root/.local/share/godot/export_templates | |
- name: Setup | |
run: | | |
mkdir -v -p ~/.local/share/godot/export_templates | |
mv /root/.local/share/godot/export_templates/${{ vars.GODOT_VERSION }}.stable ~/.local/share/godot/export_templates/${{ vars.GODOT_VERSION }}.stable | |
- name: Initial Godot import | |
shell: bash | |
run: | | |
godot --quiet --editor --headless -s addons/core/initial_import.gd || exit 0 | |
godot --editor --headless --quit || exit 0 | |
- name: Windows Build | |
run: | | |
mkdir -v -p dist/windows | |
godot --headless -v --export-debug windows dist/windows/blox.exe || exit 0 | |
- name: Sanity check | |
run: | | |
ls -alh dist/ | |
ls -alh dist/windows | |
stat dist/windows/blox.exe | |
- name: Deploy windows to itch.io | |
run: BUTLER_API_KEY=${{secrets.BUTLER_API_KEY}} butler push dist/windows russmatney/blox:windows | |
export-linux: | |
if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
name: Linux Export | |
runs-on: ubuntu-20.04 | |
container: | |
image: barichello/godot-ci:4.2.2 | |
environment: Godot Dev Env | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
lfs: true | |
- name: Issue 120 | |
run: | | |
mkdir -p /github/home/.config/godot | |
cp /root/.config/godot/editor_settings-4.tres /github/home/.config/godot/ | |
- name: Sanity check | |
run: ls /root/.local/share/godot/export_templates | |
- name: Setup | |
run: | | |
mkdir -v -p ~/.local/share/godot/export_templates | |
mv /root/.local/share/godot/export_templates/${{ vars.GODOT_VERSION }}.stable ~/.local/share/godot/export_templates/${{ vars.GODOT_VERSION }}.stable | |
- name: Initial Godot import | |
shell: bash | |
run: | | |
godot --quiet --editor --headless -s addons/core/initial_import.gd || exit 0 | |
godot --editor --headless --quit || exit 0 | |
- name: Linux Build | |
run: | | |
mkdir -v -p dist/linux | |
godot --headless -v --export-debug linux dist/linux/blox.x86_64 || exit 0 | |
- name: Sanity check | |
run: | | |
ls -alh dist/ | |
ls -alh dist/linux | |
stat dist/linux/blox.x86_64 | |
- name: Deploy linux to itch.io | |
run: BUTLER_API_KEY=${{secrets.BUTLER_API_KEY}} butler push dist/linux russmatney/blox:linux | |
export-web: | |
if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
name: Web Export | |
runs-on: ubuntu-20.04 | |
container: | |
image: barichello/godot-ci:4.2.2 | |
environment: Godot Dev Env | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
lfs: true | |
- name: Issue 120 | |
run: | | |
mkdir -p /github/home/.config/godot | |
cp /root/.config/godot/editor_settings-4.tres /github/home/.config/godot/ | |
- name: Sanity check | |
run: ls /root/.local/share/godot/export_templates | |
- name: Setup | |
run: | | |
mkdir -v -p ~/.local/share/godot/export_templates | |
mv /root/.local/share/godot/export_templates/${{ vars.GODOT_VERSION }}.stable ~/.local/share/godot/export_templates/${{ vars.GODOT_VERSION }}.stable | |
- name: Initial Godot import | |
shell: bash | |
run: | | |
godot --quiet --editor --headless -s addons/core/initial_import.gd || exit 0 | |
godot --editor --headless --quit || exit 0 | |
- name: Web Build | |
run: | | |
mkdir -v -p dist/web | |
godot --headless -v --export-debug web dist/web/index.html || exit 0 | |
- name: Sanity check | |
run: | | |
ls -alh dist/ | |
ls -alh dist/web | |
stat dist/web/index.html | |
- name: Deploy web build to itch.io | |
run: BUTLER_API_KEY=${{secrets.BUTLER_API_KEY}} butler push dist/web russmatney/blox:html5 |