generated from krampus/template-godot4
Added gitea publish action
This commit is contained in:
parent
0acfa25b19
commit
e1566aad5c
|
@ -0,0 +1,56 @@
|
||||||
|
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
|
|
@ -47,9 +47,8 @@ echo "Packaging to: $BUILD_DIR"
|
||||||
## Shared build logic
|
## Shared build logic
|
||||||
function build_project {
|
function build_project {
|
||||||
TARGET="$1"
|
TARGET="$1"
|
||||||
TARGET_SHORT="$2"
|
|
||||||
TARGET_EXT="$3"
|
TARGET_EXT="$3"
|
||||||
TARGET_SUBDIR="$PROJECT_NAME""_$TARGET_SHORT"
|
TARGET_SUBDIR="$PROJECT_NAME""_$TARGET"
|
||||||
TARGET_DIR="$BUILD_DIR/$TARGET_SUBDIR"
|
TARGET_DIR="$BUILD_DIR/$TARGET_SUBDIR"
|
||||||
TARGET_OUT="$TARGET_DIR/$PROJECT_NAME.$TARGET_EXT"
|
TARGET_OUT="$TARGET_DIR/$PROJECT_NAME.$TARGET_EXT"
|
||||||
|
|
||||||
|
@ -61,7 +60,7 @@ function build_project {
|
||||||
godot --headless --export-debug "$TARGET" $TARGET_OUT
|
godot --headless --export-debug "$TARGET" $TARGET_OUT
|
||||||
set +x
|
set +x
|
||||||
|
|
||||||
ZIP_OUT="$PROJECT_NAME""_$VERSION_TAG""_$TARGET_SHORT.7z"
|
ZIP_OUT="$PROJECT_NAME""_$VERSION_TAG""_$TARGET.7z"
|
||||||
echo "Packaging to: $ZIP_OUT"
|
echo "Packaging to: $ZIP_OUT"
|
||||||
# TODO
|
# TODO
|
||||||
|
|
||||||
|
@ -72,10 +71,10 @@ function build_project {
|
||||||
|
|
||||||
|
|
||||||
# Build linux
|
# Build linux
|
||||||
build_project "Linux" "linux64" "x86_64"
|
build_project "linux64" "x86_64"
|
||||||
|
|
||||||
# Build OSX
|
# Build OSX
|
||||||
build_project "macOS" "osx" "app"
|
build_project "osx" "app"
|
||||||
|
|
||||||
# Build Michaelsoft Binbows
|
# Build Michaelsoft Binbows
|
||||||
build_project "Windows Desktop" "win64" "exe"
|
build_project "win64" "exe"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[preset.0]
|
[preset.0]
|
||||||
|
|
||||||
name="Linux"
|
name="linux64"
|
||||||
platform="Linux"
|
platform="Linux"
|
||||||
runnable=true
|
runnable=true
|
||||||
advanced_options=true
|
advanced_options=true
|
||||||
|
@ -40,7 +40,7 @@ rm -rf \"{temp_dir}\""
|
||||||
|
|
||||||
[preset.1]
|
[preset.1]
|
||||||
|
|
||||||
name="Windows Desktop"
|
name="win64"
|
||||||
platform="Windows Desktop"
|
platform="Windows Desktop"
|
||||||
runnable=true
|
runnable=true
|
||||||
advanced_options=true
|
advanced_options=true
|
||||||
|
@ -105,7 +105,7 @@ Remove-Item -Recurse -Force '{temp_dir}'"
|
||||||
|
|
||||||
[preset.2]
|
[preset.2]
|
||||||
|
|
||||||
name="macOS"
|
name="osx"
|
||||||
platform="macOS"
|
platform="macOS"
|
||||||
runnable=true
|
runnable=true
|
||||||
advanced_options=true
|
advanced_options=true
|
||||||
|
|
Loading…
Reference in New Issue