generated from krampus/template-godot4
57 lines
1.6 KiB
YAML
57 lines
1.6 KiB
YAML
|
# Based on https://github.com/aBARICHELLO/godot-ci/blob/master/.github/workflows/godot-ci.yml
|
||
|
name: GFOLF - itch.io publish action
|
||
|
run-name: ${{ gitea.actor }} is publishing GFOLF ${{ gitea.ref_name }} to itch.io.
|
||
|
|
||
|
on:
|
||
|
push:
|
||
|
branches:
|
||
|
- ci-test
|
||
|
tags:
|
||
|
- v*
|
||
|
|
||
|
env:
|
||
|
GODOT_VERSION: 4.3
|
||
|
EXPORT_NAME: gfolf
|
||
|
PROJECT_PATH: .
|
||
|
|
||
|
jobs:
|
||
|
build:
|
||
|
runs-on: ubuntu-20.04
|
||
|
container:
|
||
|
image: barichello/godot-ci:4.3
|
||
|
strategy:
|
||
|
matrix:
|
||
|
include:
|
||
|
- target: linux64
|
||
|
type: x86_64
|
||
|
- target: osx
|
||
|
type: app
|
||
|
- target: win64
|
||
|
type: exe
|
||
|
env:
|
||
|
BUILD_DIR: build/gfolf_${{ gitea.ref_name }}_${{ matrix.target }}
|
||
|
steps:
|
||
|
- name: Checkout repository
|
||
|
run: |
|
||
|
git init
|
||
|
git remote add origin ${{ gitea.event.repository.clone_url }}
|
||
|
git fetch --depth 1 origin ${{ gitea.ref }}
|
||
|
git checkout FETCH_HEAD
|
||
|
git lfs pull
|
||
|
- name: Reimport assets
|
||
|
# bruh are you fucking kidding me. bruhh
|
||
|
run: |
|
||
|
timeout 10 godot --headless --import || true
|
||
|
godot --headless --import
|
||
|
- name: Build project
|
||
|
run: |
|
||
|
echo "building to $BUILD_DIR"
|
||
|
mkdir -p $BUILD_DIR
|
||
|
godot --headless --export-debug ${{ matrix.target }} $BUILD_DIR/gfolf.${{ matrix.type }}
|
||
|
- name: Publish
|
||
|
run: |
|
||
|
echo "pushing $BUILD_DIR"
|
||
|
butler push $BUILD_DIR tetramorph/gfolf:${{ matrix.target }} --userversion ${{ gitea.ref_name }}
|
||
|
env:
|
||
|
BUTLER_API_KEY: ${{ secrets.BUTLER_API_KEY }}
|