gfolf2/.gitea/workflows/publish.yaml

57 lines
1.6 KiB
YAML
Raw Normal View History

2025-01-11 01:50:15 +00:00
name: GFOLF - itch.io publish action
run-name: ${{ gitea.actor }} is publishing GFOLF ${{ gitea.ref }} to itch.io.
on:
push:
branches:
- ci-test
tags:
- v*
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- target: linux64
ext: x86_64
- target: osx
ext: app
- target: win64
ext: exe
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: Godot Setup
uses: lihop/setup-godot@v2
with:
version: "4.3-stable"
export-templates: true
- name: Build project
run: |
OUT_DIR=gfolf_${{ matrix.target }}
BUILD_DIR=build/$OUT_DIR
ZIP_NAME=gfolf_${{ gitea.ref }}_${{ matrix.target }}.7z
mkdir -p $BUILD_DIR
godot --headless --export-debug ${{ matrix.target }} $BUILD_DIR/gfolf.${{ matrix.ext }}
(cd build && 7z a $ZIP_NAME $OUT_DIR)
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: Debug Build - ${{ matrix.platform }}
path: ${{ gitea.workspace }}/build/"$NAME"_${{ matrix.target }}
- name: Publish
uses: yeslayla/butler-publish-itchio-action@v1
env:
BUTLER_CREDENTIALS: ${{ secrets.BUTLER_API_KEY }}
CHANNEL: ${{ matrix.target }}
ITCH_GAME: gfolf
ITCH_USER: tetramorph
PACKAGE: build/$ZIP_NAME