improvements #6
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: Godot CI/CD Pipeline | |
on: [push, pull_request] | |
env: | |
EXPORT_NAME: the-last-seed | |
GODOT_VERSION: "4.2.1" | |
GODOT_STATUS: "stable" | |
jobs: | |
import-assets: | |
runs-on: ubuntu-latest | |
container: barichello/godot-ci:4.2.1 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cache import assets | |
uses: actions/cache@v3 | |
with: | |
path: .godot/imported/ | |
key: import-assets-${{ runner.os }}-${{ github.sha }} | |
- name: Import assets | |
run: godot --headless --verbose --editor --quit | |
export-game: | |
runs-on: ubuntu-latest | |
needs: import-assets | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v3 | |
with: | |
path: .godot/imported/ | |
key: import-assets-${{ runner.os }}-${{ github.sha }} | |
- name: Export Game using Godot | |
uses: firebelley/[email protected] | |
with: | |
godot_executable_download_url: "https://github.com/godotengine/godot/releases/download/${{ env.GODOT_VERSION }}-${{ env.GODOT_STATUS }}/Godot_v${{ env.GODOT_VERSION }}-${{ env.GODOT_STATUS }}_linux_headless.64.zip" | |
godot_export_templates_download_url: "https://github.com/godotengine/godot/releases/download/${{ env.GODOT_VERSION }}-${{ env.GODOT_STATUS }}/Godot_v${{ env.GODOT_VERSION }}-${{ env.GODOT_STATUS }}_export_templates.tpz" | |
relative_project_path: "./godot" | |
archive_output: true | |
deploy-to-itchio-linux: | |
runs-on: ubuntu-latest | |
needs: export-game | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: ${{ env.EXPORT_NAME }}-linux | |
path: build/linux | |
- name: Deploy to Itch.io (Linux) | |
run: butler push build/linux ${{ secrets.ITCHIO_USERNAME }}/${{ secrets.ITCHIO_GAME }}:linux | |
env: | |
BUTLER_API_KEY: ${{ secrets.BUTLER_API_KEY }} | |
deploy-to-itchio-windows: | |
runs-on: ubuntu-latest | |
needs: export-game | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: ${{ env.EXPORT_NAME }}-windows | |
path: build/windows | |
- name: Deploy to Itch.io (Windows) | |
run: butler push build/windows ${{ secrets.ITCHIO_USERNAME }}/${{ secrets.ITCHIO_GAME }}:windows | |
env: | |
BUTLER_API_KEY: ${{ secrets.BUTLER_API_KEY }} | |
deploy-to-itchio-mac: | |
runs-on: ubuntu-latest | |
needs: export-game | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: ${{ env.EXPORT_NAME }}-mac | |
path: build/mac | |
- name: Deploy to Itch.io (Mac) | |
run: butler push build/mac ${{ secrets.ITCHIO_USERNAME }}/${{ secrets.ITCHIO_GAME }}:mac | |
env: | |
BUTLER_API_KEY: ${{ secrets.BUTLER_API_KEY }} | |
deploy-to-itchio-web: | |
runs-on: ubuntu-latest | |
needs: export-game | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: ${{ env.EXPORT_NAME }}-web | |
path: build/web | |
- name: Deploy to Itch.io (Web) | |
run: butler push build/web ${{ secrets.ITCHIO_USERNAME }}/${{ secrets.ITCHIO_GAME }}:web | |
env: | |
BUTLER_API_KEY: ${{ secrets.BUTLER_API_KEY }} |