Skip to content

Release Export

Release Export #5

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-${APP_VERSION}
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-${APP_VERSION}
godot --headless --export-release "Windows Desktop" ./builds/windows-${APP_VERSION}/$EXPORT_NAME.exe
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: windows-${APP_VERSION}
path: builds/windows-${APP_VERSION}
retention-days: 1
- name: Zip Folder
run: zip -r itch.zip builds/windows
- 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-${APP_VERSION}
godot -v --headless --export-release "Linux/X11" ./builds/linux-${APP_VERSION}/$EXPORT_NAME.x86_64
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: linux-${APP_VERSION}
path: builds/linux-${APP_VERSION}
retention-days: 1
- name: Zip Folder
run: zip -r itch.zip builds/linux-${APP_VERSION}
- 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-${APP_VERSION}
godot -v --headless --export-release "Web" ./builds/web-${APP_VERSION}/index.html
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: web-${APP_VERSION}
path: builds/web-${APP_VERSION}
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-${APP_VERSION} # The folder the action should deploy.
- name: Zip Folder
run: zip -r itch.zip builds/web-${APP_VERSION}
- 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-${APP_VERSION}
godot --headless -v --export-release "macOS" ./builds/mac-${APP_VERSION}/$EXPORT_NAME.zip
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: mac-${APP_VERSION}
path: builds/mac-${APP_VERSION}
retention-days: 1
- name: Zip Folder
run: zip -r itch.zip builds/mac-${APP_VERSION}
- 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