Last active
July 6, 2022 18:10
-
-
Save jeremyckahn/ff4f0e409f089ec36bdecb5a5adb6819 to your computer and use it in GitHub Desktop.
Companion gist for https://dev.to/jeremyckahn/automating-godot-game-releases-to-itchio-1a96
This file contains hidden or 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
# Adapted from https://raw.githubusercontent.com/RudyMis/Bubbles/master/.github/workflows/godot-ci.yml | |
name: godot-ci | |
on: | |
push: | |
branches: [ main ] | |
env: | |
EXPORT_NAME: NAME-OF-YOUR-GAME | |
GODOT_VERSION: 3.4.2 | |
jobs: | |
export-web: | |
name: Web Export | |
runs-on: ubuntu-latest | |
container: | |
image: barichello/godot-ci:3.4.2 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v1 | |
- 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 | |
apt-get update && apt-get install -y rsync | |
- name: Web Build | |
run: | | |
cd project | |
mkdir ./$EXPORT_NAME | |
rsync -Rr . ./$EXPORT_NAME | |
cd $EXPORT_NAME | |
mkdir -v -p build/web | |
godot -v --export "HTML5" build/web/index.html | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: web | |
path: project/${{ env.EXPORT_NAME }}/build/web | |
- name: Publish to itch.io | |
uses: josephbmanley/[email protected] | |
env: | |
BUTLER_CREDENTIALS: ${{ secrets.BUTLER_API_KEY }} | |
CHANNEL: web | |
ITCH_GAME: NAME-OF-YOUR-GAME | |
ITCH_USER: NAME-OF-YOUR-USER | |
PACKAGE: project/${{ env.EXPORT_NAME }}/build/web | |
- name: Notify Discord Channel | |
env: | |
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} | |
uses: Ilshidur/[email protected] | |
with: | |
args: 'A game update is available at https://NAME-OF-YOUR-USER.itch.io/NAME-OF-YOUR-GAME !' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment