From 653944fa98722bc2d7455c6a1063f9d02c795b21 Mon Sep 17 00:00:00 2001 From: Russell Matney Date: Tue, 3 Oct 2023 15:42:36 -0400 Subject: [PATCH] wip: build and deploy dino to itch, first attempt Based largely on https://github.com/abarichello/godot-ci --- .github/workflows/dino_export_and_deploy.yml | 131 +++++++++++++++++++ export_presets.cfg | 8 +- 2 files changed, 135 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/dino_export_and_deploy.yml diff --git a/.github/workflows/dino_export_and_deploy.yml b/.github/workflows/dino_export_and_deploy.yml new file mode 100644 index 000000000..395fb8469 --- /dev/null +++ b/.github/workflows/dino_export_and_deploy.yml @@ -0,0 +1,131 @@ +name: "godot-ci export" +on: push + +env: + GODOT_VERSION: 4.1.1 + EXPORT_NAME: dino + PROJECT_PATH: . + +jobs: + environment: Godot Dev Env + export-windows: + name: Windows Export + runs-on: ubuntu-20.04 + container: + image: barichello/godot-ci:4.1.1 + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + lfs: true + - name: Setup + run: | + mkdir -v -p ~/.local/share/godot/templates + mv /root/.local/share/godot/templates/${GODOT_VERSION}.stable ~/.local/share/godot/templates/${GODOT_VERSION}.stable + - name: Windows Build + run: | + mkdir -v -p dist/dino-windows + cd $PROJECT_PATH + godot -v --export "Windows Desktop" ../dist/dino-windows/$EXPORT_NAME.exe + - name: Upload Artifact + uses: actions/upload-artifact@v1 + with: + name: windows + path: dist/dino-windows + + - name: Deploy windows to itch.io + run: butler push ./dist/dino-windows russmatney/dino:windows + + export-linux: + name: Linux Export + runs-on: ubuntu-20.04 + container: + image: barichello/godot-ci:4.1.1 + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + lfs: true + - name: Setup + run: | + mkdir -v -p ~/.local/share/godot/templates + mv /root/.local/share/godot/templates/${GODOT_VERSION}.stable ~/.local/share/godot/templates/${GODOT_VERSION}.stable + - name: Linux Build + run: | + mkdir -v -p dist/dino-linux + cd $PROJECT_PATH + godot -v --export "Linux/X11" ../dist/dino-linux/$EXPORT_NAME.x86_64 + - name: Upload Artifact + uses: actions/upload-artifact@v1 + with: + name: linux + path: dist/dino-linux + + - name: Deploy linux to itch.io + run: butler push ./dist/dino-linux russmatney/dino:linux-universal + + export-web: + name: Web Export + runs-on: ubuntu-20.04 + container: + image: barichello/godot-ci:4.1.1 + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + lfs: true + - name: Setup + run: | + mkdir -v -p ~/.local/share/godot/templates + mv /root/.local/share/godot/templates/${GODOT_VERSION}.stable ~/.local/share/godot/templates/${GODOT_VERSION}.stable + - name: Web Build + run: | + mkdir -v -p dist/dino-web + cd $PROJECT_PATH + godot -v --export "HTML5" ../dist/dino-web/index.html + - name: Upload Artifact + uses: actions/upload-artifact@v1 + with: + name: web + path: dist/dino-web + + - name: Deploy web build to itch.io (dino) + run: butler push ./dist/dino-web russmatney/dino:html5 + - name: Deploy web build to itch.io (dino-web) + run: butler push ./dist/dino-web russmatney/dino-web:html5 + + # - name: Install rsync 📚 + # run: | + # apt-get update && apt-get install -y rsync + # - name: Deploy to GitHub Pages 🚀 + # uses: JamesIves/github-pages-deploy-action@releases/v4 + # with: + # branch: gh-pages # The branch the action should deploy to. + # folder: dist/dino-web # The folder the action should deploy. + + export-mac: + name: Mac Export + runs-on: ubuntu-20.04 + container: + image: barichello/godot-ci:4.1.1 + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + lfs: true + - name: Setup + run: | + mkdir -v -p ~/.local/share/godot/templates + mv /root/.local/share/godot/templates/${GODOT_VERSION}.stable ~/.local/share/godot/templates/${GODOT_VERSION}.stable + - name: Mac Build + run: | + mkdir -v -p dist/dino-macos + cd $PROJECT_PATH + godot -v --export "Mac OSX" ../dist/dino-macos/$EXPORT_NAME.dmg + - name: Upload Artifact + uses: actions/upload-artifact@v1 + with: + name: mac + path: dist/dino-macos + - name: Deploy mac build to itch.io + run: butler push ./dist/dino-macos russmatney/dino:macos-universal diff --git a/export_presets.cfg b/export_presets.cfg index 93bc877b1..3096cb520 100644 --- a/export_presets.cfg +++ b/export_presets.cfg @@ -8,7 +8,7 @@ custom_features="dino" export_filter="all_resources" include_filter="data.pandora, *dothop.txt" exclude_filter="" -export_path="dist/dino-linux/dino-linux.x86_64" +export_path="dist/dino-linux/dino.x86_64" encryption_include_filters="" encryption_exclude_filters="" encrypt_pck=false @@ -48,7 +48,7 @@ custom_features="dino" export_filter="all_resources" include_filter="" exclude_filter="" -export_path="dist/dino-macos/dino-macos.dmg" +export_path="dist/dino-macos/dino.dmg" encryption_include_filters="" encryption_exclude_filters="" encrypt_pck=false @@ -151,7 +151,7 @@ custom_features="dino" export_filter="all_resources" include_filter="" exclude_filter="" -export_path="dist/dino-windows/dino-windows.exe" +export_path="dist/dino-windows/dino.exe" encryption_include_filters="" encryption_exclude_filters="" encrypt_pck=false @@ -213,7 +213,7 @@ custom_features="dino" export_filter="all_resources" include_filter="" exclude_filter="" -export_path="dist/dino/index.html" +export_path="dist/dino-web/index.html" encryption_include_filters="" encryption_exclude_filters="" encrypt_pck=false