Update readme.md #12
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: "Push Export" | |
on: | |
push: | |
branches: | |
- main | |
# - "feature/**" | |
env: | |
GODOT_VERSION: 4.2.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.2.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.2.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.2.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: Add COI Service Worker | |
run: | | |
wget https://github.com/gzuidhof/coi-serviceworker/raw/master/coi-serviceworker.min.js -O ./builds/web/coi-serviceworker.min.js | |
- 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.2.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 |