Skip to content
This repository was archived by the owner on Oct 18, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions .github/workflows/docker-server-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
- cron: '0 13 * * 5'
push:
tags:
- 'v[0-9]+\.[0-9]+\.[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+'

env:
REGISTRY_IMAGE: tiltedphoques/st-reborn-server
Expand All @@ -32,7 +32,7 @@ jobs:
arch: arm64

steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
with:
# We need full history in order to create a version string (BuildInfo.h)
fetch-depth: 0
Expand All @@ -50,17 +50,17 @@ jobs:
echo "semver=${VERSION#v}" >> $GITHUB_OUTPUT

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@v4

- name: Login to Docker Hub
uses: docker/login-action@v3
uses: docker/login-action@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push by digest
id: build
uses: docker/build-push-action@v6
uses: docker/build-push-action@v7
with:
context: .
platforms: ${{ matrix.platform }}
Expand All @@ -84,7 +84,7 @@ jobs:
echo "${digest#sha256:}" > "/tmp/digests/${{ matrix.arch }}"

- name: Upload digest
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: digests-${{ matrix.runner }}
path: /tmp/digests/*
Expand All @@ -99,24 +99,24 @@ jobs:

steps:
- name: Download digests
uses: actions/download-artifact@v4
uses: actions/download-artifact@v8
with:
path: /tmp/digests
pattern: digests-*
merge-multiple: true

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@v4

- name: Login to Docker Hub
uses: docker/login-action@v3
uses: docker/login-action@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Generate metadata
id: meta
uses: docker/metadata-action@v5
uses: docker/metadata-action@v6
with:
images: ${{ env.REGISTRY_IMAGE }}
tags: |
Expand All @@ -128,5 +128,5 @@ jobs:
run: |
docker buildx imagetools create \
${{ steps.meta.outputs.tags && format('-t {0}', join(fromJSON(steps.meta.outputs.json).tags, ' -t ')) }} \
${{ env.REGISTRY_IMAGE }}@sha256:$(cat /tmp/digests/amd64) \
${{ env.REGISTRY_IMAGE }}@sha256:$(cat /tmp/digests/arm64)
"${REGISTRY_IMAGE}@sha256:$(cat /tmp/digests/amd64)" \
"${REGISTRY_IMAGE}@sha256:$(cat /tmp/digests/arm64)"
134 changes: 90 additions & 44 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,56 +5,102 @@ on:
push:
branches:
- master
workflow_call:
inputs:
build-mode:
required: false
type: string
default: releasedbg
upload-build-for-next-job:
required: false
type: boolean
default: false

env:
BUILD_MODE: ${{ inputs.build-mode || 'releasedbg' }}

jobs:
build:
strategy:
matrix:
os: [ubuntu-22.04]
arch: [x64]
mode: [debug]
include:
- arch: amd64
runner: ubuntu-24.04
- arch: arm64
runner: ubuntu-24.04-arm

runs-on: ${{ matrix.os }}
runs-on: ${{ matrix.runner }}
if: "!contains(github.event.head_commit.message, 'ci skip')"

steps:
- uses: actions/checkout@v4

- name: Checkout submodules
run: |
git submodule sync --recursive
git submodule update --init --force --recursive --depth=1

# Install dependencies
- name: Update apt repositories
run: sudo apt-get update

# Install xmake
- name: Setup xmake
uses: xmake-io/github-action-setup-xmake@v1
with:
xmake-version: '3.0.9'

# Update xmake repository (in order to have the file that will be cached)
- name: Update xmake repository
run: xmake repo --update

# Setup compilation mode and install project dependencies
# (continue-on-error + timeout is a temporary solution until sentry-native is fixed; shouldn't affect the building step)
- name: Configure xmake and install dependencies
continue-on-error: true
run: timeout 15m xmake config --arch=${{ matrix.arch }} --mode=${{ matrix.mode }} --yes

# Build the server
- name: Build
run: xmake -y

# Create install
#- name: Install
# run: xmake install -o packaged

# Upload artifacts
#- uses: actions/upload-artifact@v2
# with:
# name: ${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.mode }}
# path: packaged/bin/**
- uses: actions/checkout@v7
with:
# We need full history in order to create a version string (BuildInfo.h)
fetch-depth: 0

- name: Checkout submodules
run: |
git submodule sync --recursive
git submodule update --init --force --recursive --depth=1

- name: Checkout master on tag push
if: github.ref_type == 'tag'
run: |
test "$(git rev-parse HEAD)" = "$(git rev-parse origin/master)"
git checkout -B master HEAD

- name: Cache xmake dependencies
uses: actions/cache@v6
with:
path: ~/.xmake/packages
key: ${{ matrix.runner }}-xmake-${{ hashFiles('**/xmake.lua') }}

# Install xmake
- name: Setup xmake
uses: xmake-io/github-action-setup-xmake@v1
with:
xmake-version: 3.1.0
actions-cache-folder: '.xmake-cache' # This doesn't cache dependencies, only xmake itself
actions-cache-key: ${{ matrix.runner }}

- name: Configure xmake and install dependencies
run: xmake config --mode="$BUILD_MODE" --yes -vD

# Build the server
- name: Build
run: xmake -y

- name: Stage Linux server
run: |
xmake install -o packaged
install -d release-stage
install -m 755 packaged/bin/SkyrimTogetherServer release-stage/
install -m 644 packaged/lib/libSTServer.so release-stage/

- name: Verify Linux binary architecture
run: |
file release-stage/SkyrimTogetherServer
case "${{ matrix.arch }}" in
amd64) file release-stage/SkyrimTogetherServer | grep -Eq 'x86-64|x86_64' ;;
arm64) file release-stage/SkyrimTogetherServer | grep -Eqi 'aarch64|arm64' ;;
esac

- name: Create Linux release archive
if: ${{ inputs.upload-build-for-next-job }}
run: |
version="${GITHUB_REF_NAME#v}"
echo "ARTIFACT_VERSION=$version" >> "$GITHUB_ENV"
mkdir -p release-assets
tar -C release-stage -czf \
"release-assets/SkyrimTogetherServer-${version}-linux-${{ matrix.arch }}.tar.gz" \
.

# Upload artifacts
- name: Upload build files for the next job
if: ${{ inputs.upload-build-for-next-job }}
uses: actions/upload-artifact@v7
with:
name: release-asset-linux-${{ matrix.arch }}
retention-days: 1
if-no-files-found: error
path: release-assets/SkyrimTogetherServer-${{ env.ARTIFACT_VERSION }}-linux-${{ matrix.arch }}.tar.gz
55 changes: 55 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Create GitHub Release

on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'

jobs:
build-windows:
uses: ./.github/workflows/windows-playable-build.yml

build-linux:
uses: ./.github/workflows/linux.yml
with:
build-mode: release
upload-build-for-next-job: true

publish:
needs: [build-windows, build-linux]
runs-on: ubuntu-24.04
permissions:
contents: write
steps:
- name: Download release assets
uses: actions/download-artifact@v8
with:
path: release-files
pattern: '{release-asset-linux-*,SkyrimTogether-*}'
merge-multiple: true

- name: Verify release assets
run: |
version="${GITHUB_REF_NAME#v}"
expected_assets=(
"SkyrimTogether-${version}-windows-x64.zip"
"SkyrimTogether-${version}-windows-x64-debug-symbols.zip"
"SkyrimTogetherServer-${version}-linux-amd64.tar.gz"
"SkyrimTogetherServer-${version}-linux-arm64.tar.gz"
)

for asset in "${expected_assets[@]}"; do
test -f "release-files/$asset"
done

- name: Create GitHub Release
env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
run: |
version="${GITHUB_REF_NAME#v}"
gh release create "$GITHUB_REF_NAME" \
./release-files/* \
--verify-tag \
--generate-notes \
--title "Skyrim Together $version"
39 changes: 2 additions & 37 deletions .github/workflows/windows-playable-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,47 +8,12 @@ on:
push:
branches:
- master
tags:
- 'v[0-9]+\.[0-9]+\.[0-9]+'
workflow_call:

jobs:
build-windows:
if: ${{ github.repository_owner == 'tiltedphoques' || github.event_name != 'schedule' }} # Disable cron runs in forks
uses: ./.github/workflows/windows.yml
with:
build-mode: 'release'
build-mode: release
upload-build-for-next-job: true

package-and-upload:
runs-on: windows-2022
needs: build-windows
steps:
- name: Download artifact from the previous job
uses: actions/download-artifact@v5
with:
name: internal-job-files

- name: Package build and organize directories
run: |
mkdir -p str-build/SkyrimTogetherReborn
mv build/windows/x64/release/* str-build/SkyrimTogetherReborn
cp -r GameFiles/Skyrim/* str-build/

- name: Remove unnecessary build files, keep .pdb
run: |
mkdir str-pdb
mv str-build/SkyrimTogetherReborn/SkyrimTogether.pdb, str-build/SkyrimTogetherReborn/SkyrimTogetherServer.pdb str-pdb
rm str-build/SkyrimTogetherReborn/*.pdb, str-build/SkyrimTogetherReborn/*.lib, str-build/SkyrimTogetherReborn/*.exp
rm str-build/SkyrimTogetherReborn/*Tests.exe

- name: Upload playable build
uses: actions/upload-artifact@v4
with:
name: Skyrim Together Build (${{ needs.build-windows.outputs.str-version }})
path: str-build/

- name: Upload debug symbols
uses: actions/upload-artifact@v4
with:
name: Debug Symbols (${{ needs.build-windows.outputs.str-version }})
path: str-pdb/
Loading
Loading