Last active
January 18, 2022 15:28
-
-
Save jeremyckahn/bcfe074d774b2e75ad990fcb30c7a410 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: farmhand-go | |
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: farmhand-go | |
ITCH_USER: rainbowcow-studio | |
PACKAGE: project/${{ env.EXPORT_NAME }}/build/web | |
- name: Notify Discord Channel | |
env: | |
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} | |
uses: Ilshidur/[email protected] | |
with: | |
args: 'A Farmhand Go! update is available at https://rainbowcow-studio.itch.io/farmhand-go. Happy farming! 🐮' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment