Skip to content

Fix crashes in sync's GameServerModelRegistry_ParseBinaryObjectsHelpe… #45

Fix crashes in sync's GameServerModelRegistry_ParseBinaryObjectsHelpe…

Fix crashes in sync's GameServerModelRegistry_ParseBinaryObjectsHelpe… #45

Workflow file for this run

name: Create Release
on:
push:
tags:
- "v*" # triggers when a tag like v0.6.1 or v0.6.1.alpha.9 is pushed
jobs:
create-release:
runs-on: ubuntu-latest
permissions:
contents: write
name: Create Release
steps:
- name: Checkout code
uses: actions/checkout@v6
# ✅ Step 1 — Check if Build succeeded for this same commit
- name: Check latest Build success
id: check_build
run: |
echo "Checking for successful Build workflow for commit ${{ github.sha }}..."
response=$(gh api \
-H "Accept: application/vnd.github+json" \
/repos/${{ github.repository }}/actions/runs \
--jq '.workflow_runs[] | select(.name=="Build" and .head_sha=="${{ github.sha }}" and .conclusion=="success") | .id' | head -n 1)
if [ -z "$response" ]; then
echo "❌ No successful Build workflow found for this commit."
exit 1
fi
echo "✅ Found successful Build run ID: $response"
echo "build_run_id=$response" >> $GITHUB_OUTPUT
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# ✅ Step 2 — Download the Build artifacts
- name: Download artifact from Build workflow
uses: dawidd6/action-download-artifact@v18
with:
run_id: ${{ steps.check_build.outputs.build_run_id }}
# ✅ Step 3 — Package up
- name: Package
run: |
(cd stfc-community-mod && zip -r - .) > stfc-community-mod.zip
- name: Package Windows mod archive
run: |
sudo apt-get update
sudo apt-get install -y zstd
mkdir -p stfc-community-mod-windows-x64
tar -cf - -C stfc-community-mod version.dll \
| zstd -19 -T0 -o stfc-community-mod-windows-x64/stfc-community-mod-windows-x64.tar.zst
sha256sum stfc-community-mod-windows-x64/stfc-community-mod-windows-x64.tar.zst \
| awk '{print $1}' \
> stfc-community-mod-windows-x64/stfc-community-mod-windows-x64.tar.zst.sha256
# ✅ Step 4 — Detect prerelease (alpha/beta)
- name: Check Prerelease
id: check-prerelease
run: |
if echo "${{ github.ref_name }}" | grep -Pq "^v[\d]+.[\d]+.[\d]+(?:\.(alpha|beta)\.[\d]+)?$"; then
echo "prerelease=true" >> "$GITHUB_OUTPUT"
fi
# ✅ Step 5 — Create Release
- name: Create Release
id: create_release
uses: ncipollo/release-action@v1
with:
tag: ${{ github.ref }}
name: ${{ github.ref_name }}
generateReleaseNotes: true
prerelease: ${{ steps.check-prerelease.outputs.prerelease == 'true' }}
# ✅ Step 6 — Upload assets
- name: Upload Community Mod - Standard
uses: shogo82148/actions-upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./stfc-community-mod.zip
asset_name: stfc-community-mod.zip
asset_content_type: application/zip
- name: Upload Community Mod - Versioned
uses: shogo82148/actions-upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./stfc-community-mod.zip
asset_name: stfc-community-mod-${{ github.ref_name }}.zip
asset_content_type: application/zip
- name: Upload Community Mod - Windows Archive
uses: shogo82148/actions-upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./stfc-community-mod-windows-x64/stfc-community-mod-windows-x64.tar.zst
asset_name: stfc-community-mod-windows-x64.tar.zst
asset_content_type: application/zstd
- name: Upload Community Mod - Windows Archive Checksum
uses: shogo82148/actions-upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./stfc-community-mod-windows-x64/stfc-community-mod-windows-x64.tar.zst.sha256
asset_name: stfc-community-mod-windows-x64.tar.zst.sha256
asset_content_type: text/plain
- name: Upload Community Mod - macOS Archive
uses: shogo82148/actions-upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./stfc-community-mod-macos-universal/stfc-community-mod-macos-universal.tar.zst
asset_name: stfc-community-mod-macos-universal.tar.zst
asset_content_type: application/zstd
- name: Upload Community Mod - macOS Archive Checksum
uses: shogo82148/actions-upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./stfc-community-mod-macos-universal/stfc-community-mod-macos-universal.tar.zst.sha256
asset_name: stfc-community-mod-macos-universal.tar.zst.sha256
asset_content_type: text/plain
- name: Upload Community Mod - Mac Installer
uses: shogo82148/actions-upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./stfc-community-mod-installer/stfc-community-mod-installer.dmg
asset_name: stfc-community-mod-installer.dmg
asset_content_type: application/x-apple-diskimage