Skip to content

Instantly share code, notes, and snippets.

@sesopenko
Created October 5, 2022 21:19
Show Gist options
  • Save sesopenko/93da4723561b502485ecc2e829265d50 to your computer and use it in GitHub Desktop.
Save sesopenko/93da4723561b502485ecc2e829265d50 to your computer and use it in GitHub Desktop.
.github/workflows/mainline.yml for Godot publishing to itch.io
# Whenever a tag push matching pattern "v*" then run the job
on:
push:
tags:
- "v*"
jobs:
# job id, can be anything
export_game:
# Always use ubuntu-latest for this action
runs-on: ubuntu-latest
# Job name, can be anything
name: Export Game
strategy:
fail-fast: true
steps:
# Always include the checkout step so that
# your project is available for Godot to export
- name: checkout
uses: actions/[email protected]
# Ensure that you get the entire project history
with:
fetch-depth: 0
# Automatically stores the tag name for later use
- name: get tag from version
id: tag_version
run: |
echo ::set-output name=TAG_VERSION::${GITHUB_REF#refs/tags/v}
- name: export game
id: export
# Use latest version (see releases for all versions)
uses: firebelley/[email protected]
with:
# Defining all the required inputs
godot_executable_download_url: https://github.com/godotengine/godot/releases/download/3.5.1-stable/Godot_v3.5.1-stable_linux_headless.64.zip
godot_export_templates_download_url: https://github.com/godotengine/godot/releases/download/3.5.1-stable/Godot_v3.5.1-stable_export_templates.tpz
relative_project_path: ./
archive_output: true
- name: list export
id: list_export
run: ls -lha ${{ steps.export.outputs.archive_directory }}
- name: upload windows artifact
id: upload_win_artifact
uses: actions/upload-artifact@v3
with:
name: ${{ steps.tag_version.outputs.TAG_VERSION }}-win
path: ${{ steps.export.outputs.archive_directory }}/win.zip
- name: upload webgl artifact
id: upload_webgl_artifact
uses: actions/upload-artifact@v3
with:
name: ${{ steps.tag_version.outputs.TAG_VERSION }}-webgl
path: ${{ steps.export.outputs.archive_directory }}/webgl.zip
# - name: upload windows to itch
# id: itch_win_upload
# uses: KikimoraGames/[email protected]
# with:
# butlerApiKey: ${{secrets.BUTLER_API_KEY}}
# gameData: ${{ steps.export.outputs.archive_directory }}/win.zip
# itchUsername: ${{env.ITCH_USERNAME}}
# itchGameId: ${{ env.ITCH_GAME_ID }}
# buildChannel: windows
# buildNumber: ${{ needs.version.outputs.version_hash }}
- name: download-artifact-win
id: artifact_win_download
uses: actions/[email protected]
with:
name: ${{ steps.tag_version.outputs.TAG_VERSION }}-win
path: build/win
- name: list artifact
id: list_artifact
run: ls -lha ./build/win
- name: push windows to itch
id: itch_win_push
uses: KikimoraGames/[email protected]
with:
butlerApiKey: ${{secrets.BUTLER_API_KEY}}
gameData: ./build/win/win.zip
itchUsername: ${{secrets.ITCH_USERNAME}}
itchGameId: ${{ secrets.ITCH_GAME_ID }}
buildChannel: windows
buildNumber: ${{ steps.tag_version.outputs.TAG_VERSION }}
- name: download-artifact-webgl
id: artifact_webgl_download
uses: actions/[email protected]
with:
name: ${{ steps.tag_version.outputs.TAG_VERSION }}-webgl
path: build/webgl
- name: push webgl to itch
id: itch_webgl_push
uses: KikimoraGames/[email protected]
with:
butlerApiKey: ${{secrets.BUTLER_API_KEY}}
gameData: ./build/webgl/webgl.zip
itchUsername: ${{secrets.ITCH_USERNAME}}
itchGameId: ${{ secrets.ITCH_GAME_ID }}
buildChannel: webgl
buildNumber: ${{ steps.tag_version.outputs.TAG_VERSION }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment