Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
smileynet committed Oct 22, 2023
2 parents 426dca8 + 0c4cadc commit d70fbde
Showing 1 changed file with 158 additions and 0 deletions.
158 changes: 158 additions & 0 deletions .github/workflows/release-export.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
name: "Release Export"
on:
release:
types: [published]
env:
GODOT_VERSION: 4.1.1
EXPORT_NAME: godot-game-template
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
godot --headless --export-release "Windows Desktop" ./builds/windows/$EXPORT_NAME.exe
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: windows
path: builds/windows
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
godot -v --headless --export-release "Linux/X11" ./builds/linux/$EXPORT_NAME.x86_64
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: linux
path: builds/linux
retention-days: 1
- name: Zip Folder
run: zip -r itch.zip builds/linux
- 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
godot -v --headless --export-release "Web" ./builds/web/index.html
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: web
path: builds/web
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 # The folder the action should deploy.
- name: Zip Folder
run: zip -r itch.zip builds/web
- 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
godot --headless -v --export-release "macOS" ./builds/mac/$EXPORT_NAME.zip
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: mac
path: builds/mac
retention-days: 1
- name: Zip Folder
run: zip -r itch.zip builds/mac
- 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

0 comments on commit d70fbde

Please sign in to comment.