Skip to content

MVF - Phase 8

MVF - Phase 8 #17

Workflow file for this run

name: "Release Export"
on:
release:
types: [published]
env:
GODOT_VERSION: 4.1.1
APP_VERSION: ${{ github.ref_name }}
EXPORT_NAME: rimidle-${{ github.ref_name }}
ITCH_IO: false #set to true if you want to enable automatic itch.io deploy
jobs:
export-windows:
if: true
name: Windows Export
runs-on: ubuntu-20.04
container:
image: barichello/godot-ci:4.1.1
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Setup
run: |
mkdir -v -p ~/.local/share/godot/export_templates/${GODOT_VERSION}.stable/
mv -v /root/.local/share/godot/templates/* ~/.local/share/godot/export_templates/
- name: Windows Build
run: |
mkdir -v -p builds/windows-${{ github.ref_name }}
godot --headless --export-release "Windows Desktop" ./builds/windows-${{ github.ref_name }}/$EXPORT_NAME.exe
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: windows-${{ github.ref_name }}
path: builds/windows-${{ github.ref_name }}
retention-days: 1
- name: Zip Folder
if: ${{ env.ITCH_IO=='true' }}
run: zip -r itch.zip builds/windows-${{ github.ref_name }}
- name: Deploy to itch.io
if: ${{ env.ITCH_IO=='true' }}
uses: josephbmanley/butler-publish-itchio-action@master
env:
BUTLER_CREDENTIALS: ${{ secrets.BUTLER_CREDENTIALS }}
CHANNEL: windows
ITCH_GAME: ${{ secrets.ITCH_GAME }}
ITCH_USER: ${{ secrets.ITCH_USER }}
PACKAGE: itch.zip
export-linux:
if: true
name: Linux Export
runs-on: ubuntu-20.04
container:
image: barichello/godot-ci:4.1.1
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Setup
run: |
mkdir -v -p ~/.local/share/godot/export_templates/${GODOT_VERSION}.stable/
mv -v /root/.local/share/godot/templates/* ~/.local/share/godot/export_templates/
- name: Linux Build
run: |
mkdir -v -p builds/linux-${{ github.ref_name }}
godot -v --headless --export-release "Linux/X11" ./builds/linux-${{ github.ref_name }}/$EXPORT_NAME.x86_64
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: linux-${{ github.ref_name }}
path: builds/linux-${{ github.ref_name }}
retention-days: 1
- name: Zip Folder
if: ${{ env.ITCH_IO=='true' }}
run: zip -r itch.zip builds/linux-${{ github.ref_name }}
- name: Deploy to itch.io
if: ${{ env.ITCH_IO=='true' }}
uses: josephbmanley/butler-publish-itchio-action@master
env:
BUTLER_CREDENTIALS: ${{ secrets.BUTLER_CREDENTIALS }}
CHANNEL: linux
ITCH_GAME: ${{ secrets.ITCH_GAME }}
ITCH_USER: ${{ secrets.ITCH_USER }}
PACKAGE: itch.zip
export-web:
if: true
name: Web Export
runs-on: ubuntu-20.04
container:
image: barichello/godot-ci:4.1.1
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Setup
run: |
mkdir -v -p ~/.local/share/godot/export_templates/${GODOT_VERSION}.stable/
mv -v /root/.local/share/godot/templates/* ~/.local/share/godot/export_templates/
- name: Web Build
run: |
mkdir -v -p builds/web-${{ github.ref_name }}
godot -v --headless --export-release "Web" ./builds/web-${{ github.ref_name }}/index.html
- name: Add coi-service-worker
run: |
git clone https://github.com/gzuidhof/coi-serviceworker.git
mv coi-serviceworker/coi-serviceworker.js builds/web-${{ github.ref_name }}/coi-serviceworker.js
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: web-${{ github.ref_name }}
path: builds/web-${{ github.ref_name }}
retention-days: 1
# Installing rsync is needed in order to deploy to GitHub Pages. Without it, the build will fail.
- 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: builds/web-${{ github.ref_name }} # The folder the action should deploy.
- name: Zip Folder
if: ${{ env.ITCH_IO=='true' }}
run: zip -r itch.zip builds/web-${{ github.ref_name }}
- name: Deploy to itch.io
if: ${{ env.ITCH_IO=='true' }}
uses: josephbmanley/butler-publish-itchio-action@master
env:
BUTLER_CREDENTIALS: ${{ secrets.BUTLER_CREDENTIALS }}
CHANNEL: HTML
ITCH_GAME: ${{ secrets.ITCH_GAME }}
ITCH_USER: ${{ secrets.ITCH_USER }}
PACKAGE: itch.zip
export-mac:
if: false # currently broken, see https://github.com/crystal-bit/godot-game-template/issues/82
name: Mac Export
runs-on: ubuntu-20.04
container:
image: barichello/godot-ci:4.1.1
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Setup
run: |
mkdir -v -p ~/.local/share/godot/export_templates/${GODOT_VERSION}.stable/
mv -v /root/.local/share/godot/templates/* ~/.local/share/godot/export_templates/
- name: Mac Build
run: |
mkdir -v -p builds/mac-${{ github.ref_name }}
godot --headless -v --export-release "macOS" ./builds/mac-${{ github.ref_name }}/$EXPORT_NAME.zip
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: mac-${{ github.ref_name }}
path: builds/mac-${{ github.ref_name }}
retention-days: 1
- name: Zip Folder
if: ${{ env.ITCH_IO=='true' }}
run: zip -r itch.zip builds/mac-${{ github.ref_name }}
- name: Deploy to itch.io
if: ${{ env.ITCH_IO=='true' }}
uses: josephbmanley/butler-publish-itchio-action@master
env:
BUTLER_CREDENTIALS: ${{ secrets.BUTLER_CREDENTIALS }}
CHANNEL: mac
ITCH_GAME: ${{ secrets.ITCH_GAME }}
ITCH_USER: ${{ secrets.ITCH_USER }}
PACKAGE: itch.zip