Files
HanjaKanaMun/.gitea/workflows/gitea-release.yaml
T
SansanandClaude Opus 5.5 e893c45d4f Add Windows cross-build and Gitea release; share CI setup
- just windows-deps / windows / package-windows: cross-compile with Odin
  objects + lld-link against an xwin SDK, static VC runtime
- Release workflow runs on v* tags, builds Linux and Windows packages,
  uploads them to the package registry and creates a Gitea release
- Shared toolchain setup as a local composite action

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 21:27:22 +02:00

65 lines
1.7 KiB
YAML

#
# .gitea/workflows/gitea-release.yaml
#
# On a version tag (e.g. v1.0): tests, builds Linux and Windows packages,
# uploads them to the Gitea generic package registry and creates a Gitea release.
#
name: "Release"
on:
push:
tags:
- 'v*'
env:
PROJECT_NAME: HanjaKanaMun
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup Toolchain
uses: ./.gitea/actions/setup
with:
packages: lld zip
- name: Set Version
run: echo "GAME_VERSION=${GITHUB_REF_NAME#v}" >> "$GITHUB_ENV"
- name: Test
run: just test
- name: Linux Build
run: just package "$GAME_VERSION"
- name: Windows Build
run: |
# Debian/Ubuntu may only ship a versioned lld-link
LLD_LINK="$(command -v lld-link || ls /usr/lib/llvm-*/bin/lld-link | sort -V | tail -1)"
export LLD_LINK
just windows-deps
just package-windows "$GAME_VERSION"
- name: Upload Artifacts
run: |
ls -la build
for FILE in build/${PROJECT_NAME}_${GAME_VERSION}_*; do
NAME="$(basename "$FILE")"
echo "Uploading $NAME"
curl --fail --user ${{ github.repository_owner }}:${{ secrets.TOKEN }} \
--upload-file "$FILE" \
https://gitea.sanplex.xyz/api/packages/sansan/generic/$PROJECT_NAME/$GAME_VERSION/$NAME
done
- name: Create Release
uses: akkuman/gitea-release-action@v1
env:
NODE_OPTIONS: '--experimental-fetch' # if nodejs < 18
with:
files: |-
build/${{ env.PROJECT_NAME }}_*.tar.gz
build/${{ env.PROJECT_NAME }}_*.zip