forked from space-syndicate/space-station-14
Some checks failed
Build & Test Map Renderer / build (ubuntu-latest) (push) Successful in 3m48s
RGA schema validator / YAML RGA schema validator (push) Successful in 1m0s
RSI Validator / Validate RSIs (push) Failing after 5s
Test Packaging / Test Packaging (push) Successful in 6m18s
YAML Linter / YAML Linter (push) Successful in 3m36s
Build & Test Map Renderer / Build & Test Debug (push) Successful in 1s
Map file schema validator / YAML map schema validator (push) Successful in 10m11s
Build & Test Debug / build (ubuntu-latest) (push) Successful in 36m26s
Build & Test Debug / Build & Test Debug (push) Successful in 3s
Publish / build (push) Failing after 3m40s
Publish Public / build (push) Failing after 12m18s
Upstream Sync / check-and-sync (push) Failing after 2m6s
Publish Testing / build (push) Failing after 17m19s
Benchmarks / Run Benchmarks (push) Failing after 3h9m6s
Update Contrib and Patreons in credits / get_credits (push) Has been skipped
Build & Publish Docfx / docfx (push) Failing after 12m15s
145 lines
5.3 KiB
YAML
145 lines
5.3 KiB
YAML
name: Publish
|
|
|
|
concurrency:
|
|
group: publish
|
|
cancel-in-progress: true
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- master
|
|
schedule:
|
|
- cron: '0 1 * * *'
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
CDN_MANIFEST_URL: https://cdn.wylab.me/fork/wylab/manifest
|
|
RUNNER_TOOL_CACHE: /toolcache
|
|
steps:
|
|
- name: Fail if we are attempting to run on the master branch
|
|
if: ${{GITHUB.REF_NAME == 'master' && github.repository == 'space-wizards/space-station-14'}}
|
|
run: exit 1
|
|
|
|
# - name: Install dependencies
|
|
# run: sudo apt-get install -y python3-paramiko python3-lxml
|
|
|
|
- uses: actions/checkout@v4.2.2
|
|
with:
|
|
submodules: 'recursive'
|
|
|
|
- name: Check if build already published
|
|
id: cdn-check
|
|
run: |
|
|
SHA=$(echo "$GITHUB_SHA" | tr '[:upper:]' '[:lower:]')
|
|
if curl -sSf "$CDN_MANIFEST_URL" | jq -e ".builds[\"$SHA\"]" > /dev/null 2>&1; then
|
|
echo "Build $SHA already present on CDN; skipping."
|
|
echo "skip=true" >> "$GITHUB_OUTPUT"
|
|
else
|
|
echo "Build $SHA not found on CDN; continuing."
|
|
echo "skip=false" >> "$GITHUB_OUTPUT"
|
|
fi
|
|
|
|
- name: Cache NuGet packages
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: ~/.nuget/packages
|
|
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj', 'global.json') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-nuget-
|
|
|
|
- name: Cache RobustToolbox build output
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: RobustToolbox/bin
|
|
key: ${{ runner.os }}-robust-${{ hashFiles('RobustToolbox/**/*.csproj', 'global.json') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-robust-
|
|
|
|
# Wylab-Secrets-Start
|
|
- name: Setup secrets
|
|
env:
|
|
SSH_KEY: ${{ secrets.SECRETS_PRIVATE_KEY }}
|
|
if: ${{ env.SSH_KEY != '' }}
|
|
run: |
|
|
mkdir -p ~/.ssh
|
|
echo "${{ secrets.SECRETS_PRIVATE_KEY }}" > ~/.ssh/id_rsa
|
|
chmod 600 ~/.ssh/id_rsa
|
|
printf '%s\n' 'Host git.wylab.me' ' Hostname git.wylab.me' ' Port 22' ' User git' ' IdentityFile ~/.ssh/id_rsa' ' StrictHostKeyChecking no' ' UserKnownHostsFile /dev/null' > ~/.ssh/config
|
|
chmod 600 ~/.ssh/config
|
|
git clone git@git.wylab.me:wylab/secrets.git Secrets
|
|
[ -d Secrets/Resources/Prototypes ] && cp -R Secrets/Resources/Prototypes Resources/Prototypes/WylabSecrets
|
|
[ -d Secrets/Resources/ServerPrototypes ] && cp -R Secrets/Resources/ServerPrototypes Resources/Prototypes/WylabSecretsServer
|
|
[ -d Secrets/Resources/Locale ] && cp -R Secrets/Resources/Locale Resources/Locale/ru-RU/wylab-secrets
|
|
[ -d Secrets/Resources/Textures ] && cp -R Secrets/Resources/Textures Resources/Textures/WylabSecrets
|
|
[ -d Secrets/Resources/Audio ] && cp -R Secrets/Resources/Audio Resources/Audio/WylabSecrets
|
|
# Wylab-Secrets-End
|
|
|
|
- name: Setup .NET Core
|
|
uses: actions/setup-dotnet@v4.1.0
|
|
with:
|
|
dotnet-version: 9.0.x
|
|
if: ${{ steps.cdn-check.outputs.skip != 'true' }}
|
|
|
|
- name: Get Engine Tag
|
|
run: |
|
|
cd RobustToolbox
|
|
git fetch --depth=1
|
|
if: ${{ steps.cdn-check.outputs.skip != 'true' }}
|
|
|
|
- name: Install dependencies
|
|
run: dotnet restore
|
|
if: ${{ steps.cdn-check.outputs.skip != 'true' }}
|
|
|
|
- name: Build Packaging
|
|
run: dotnet build Content.Packaging --configuration Release --no-restore /m
|
|
if: ${{ steps.cdn-check.outputs.skip != 'true' }}
|
|
|
|
- name: Package server
|
|
run: dotnet run --project Content.Packaging server --platform win-x64 --platform win-arm64 --platform linux-x64 --platform linux-arm64 --platform osx-x64 --platform osx-arm64
|
|
if: ${{ steps.cdn-check.outputs.skip != 'true' }}
|
|
|
|
- name: Package client
|
|
run: dotnet run --project Content.Packaging client --no-wipe-release
|
|
if: ${{ steps.cdn-check.outputs.skip != 'true' }}
|
|
|
|
- name: Publish version
|
|
run: Tools/publish_multi_request.py
|
|
env:
|
|
PUBLISH_TOKEN: ${{ secrets.PUBLISH_TOKEN }}
|
|
GITHUB_REPOSITORY: wylab/wylab-station-14
|
|
FORK_ID: wylab
|
|
ROBUST_CDN_URL: https://cdn.wylab.me/
|
|
if: ${{ steps.cdn-check.outputs.skip != 'true' }}
|
|
|
|
- name: Trigger Docker image rebuild
|
|
if: ${{ success() && steps.cdn-check.outputs.skip != 'true' }}
|
|
env:
|
|
DISPATCH_TOKEN: ${{ secrets.DOCKER_TRIGGER_TOKEN }}
|
|
TARGET_REPO: wylab/WS14-Docker-Linux-Server
|
|
PAYLOAD: ${{ github.sha }}
|
|
run: |
|
|
if [ -z "${DISPATCH_TOKEN}" ]; then
|
|
echo "No DOCKER_TRIGGER_TOKEN configured; skipping dispatch."
|
|
exit 0
|
|
fi
|
|
curl -sSL -X POST \
|
|
-H "Authorization: token ${DISPATCH_TOKEN}" \
|
|
-H "Content-Type: application/json" \
|
|
https://git.wylab.me/api/v1/repos/${TARGET_REPO}/actions/workflows/main.yml/dispatches \
|
|
-d "{\"ref\":\"main\",\"inputs\":{\"commit\":\"${PAYLOAD}\"}}"
|
|
|
|
# - name: Publish changelog (Discord)
|
|
# continue-on-error: true
|
|
# run: Tools/actions_changelogs_since_last_run.py
|
|
# env:
|
|
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
# DISCORD_WEBHOOK_URL: ${{ secrets.CHANGELOG_DISCORD_WEBHOOK }}
|
|
|
|
# - name: Publish changelog (RSS)
|
|
# continue-on-error: true
|
|
# run: Tools/actions_changelog_rss.py
|
|
# env:
|
|
# CHANGELOG_RSS_KEY: ${{ secrets.CHANGELOG_RSS_KEY }}
|