Skip to content

fix tests

fix tests #36

Workflow file for this run

name: Release Addon Package
permissions:
contents: write
on:
push:
tags:
- 'v*' # Triggered on tag push in v1.0.0 format
workflow_dispatch: # Can also be run manually from the Actions tab
jobs:
build:
runs-on: ubuntu-latest
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # Full history & tags needed for the changelog
- name: Get commit hash & tag
id: meta
run: |
echo "sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
# Resolve the release tag. On tag push GITHUB_REF_NAME is the tag;
# on manual workflow_dispatch it is a branch, so fall back to the latest tag.
if [ "$GITHUB_REF_TYPE" = "tag" ]; then
TAG="${GITHUB_REF_NAME}"
else
TAG=$(git describe --tags --abbrev=0)
fi
echo "tag=${TAG}" >> $GITHUB_OUTPUT
# Previous tag (immediately before the current one); empty if this is the first tag
PREV_TAG=$(git describe --tags --abbrev=0 "${TAG}^" 2>/dev/null || echo "")
if [ -n "$PREV_TAG" ]; then
RANGE="${PREV_TAG}..${TAG}"
echo "prev_tag=${PREV_TAG}" >> $GITHUB_OUTPUT
else
RANGE="${TAG}"
fi
# Collect commit subjects since the previous tag as a bulleted list.
# Random heredoc delimiter so a commit message can't terminate it early.
DELIM="CHANGELOG_$(uuidgen)"
{
echo "changelog<<${DELIM}"
git log --no-merges --pretty=format:'- %s (%h)' "$RANGE"
echo ""
echo "${DELIM}"
} >> $GITHUB_OUTPUT
- name: Build addon zip
run: |
mkdir -p dist
# Zip from inside dist/ so the archive root is addons/ (not dist/addons/)
cd dist
zip -r klotho-godot-addons-${{ steps.meta.outputs.sha }}.zip \
addons/ \
--exclude "*.import" \
--exclude "*.DS_Store" \
--exclude "__MACOSX*" \
--exclude "*/Thumbs.db"
- name: Upload to Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.meta.outputs.tag }}
name: ${{ steps.meta.outputs.tag }}
body: |
## Klotho ${{ steps.meta.outputs.tag }}
Deterministic Unity & Godot framework for rollback, lockstep & server-authoritative multiplayer. Engine-agnostic pure C# core, FP64 fixed-point math, ECS, physics, navigation, and replays — frame-perfect, cross-platform reproducible.
### Godot(.NET) Installation
1. Download the zip and extract it
2. Copy the `klotho/` folder into your project's `res://addons/`
3. Add one line to your game `.csproj`:
```xml
<Import Project="addons/klotho/Klotho.props" />
```
> No `.csproj` yet? Generate one via *Project* ▸ *Tools* ▸ *C#* ▸ **Create C# solution**, then add the line above.
4. Build (`dotnet build` or the Godot editor's **Build** button)
See [Installation.Godot.md](https://github.com/xpTURN/Klotho/blob/${{ steps.meta.outputs.tag }}/Docs/Installation.Godot.md) for the dedicated-server setup and full details.
### Unity Installation
Add via **Window > Package Manager > + > Add package from git URL...** (in order):
```
https://github.com/Cysharp/UniTask.git?path=src/UniTask/Assets/Plugins/UniTask
https://github.com/xpTURN/Polyfill.git?path=src/Polyfill/Assets/Polyfill
https://github.com/xpTURN/Klotho.git?path=com.xpturn.klotho#${{ steps.meta.outputs.tag }}
```
See [Installation.Unity.md](https://github.com/xpTURN/Klotho/blob/${{ steps.meta.outputs.tag }}/Docs/Installation.Unity.md) for Polyfill activation, the dedicated-server setup and full details.
### Changes
${{ steps.meta.outputs.changelog }}
files: dist/klotho-godot-addons-${{ steps.meta.outputs.sha }}.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}