Skip to content
This repository has been archived by the owner on Nov 1, 2024. It is now read-only.

Commit

Permalink
Update publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Morb0 authored Apr 28, 2024
1 parent 8be2297 commit bfc7568
Showing 1 changed file with 72 additions and 6 deletions.
78 changes: 72 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,82 @@ concurrency:

on:
workflow_dispatch:
schedule:
- cron: '0 6 * * *'

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Send POST-request
- uses: actions/[email protected]
with:
submodules: 'recursive'

# Corvax-Secrets-Start
- name: Setup secrets
env:
SSH_KEY: ${{ secrets.SECRETS_PRIVATE_KEY }}
if: ${{ env.SSH_KEY != '' }}
run: |
mkdir ~/.ssh
echo "${{ secrets.SECRETS_PRIVATE_KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
echo "HOST *" > ~/.ssh/config
echo "StrictHostKeyChecking no" >> ~/.ssh/config
git -c submodule.Secrets.update=checkout submodule update --init
cp -R Secrets/Resources/Prototypes Resources/Prototypes/CorvaxSecrets
cp -R Secrets/Resources/ServerPrototypes Resources/Prototypes/CorvaxSecretsServer
cp -R Secrets/Resources/Locale Resources/Locale/ru-RU/corvax-secrets
cp -R Secrets/Resources/Textures Resources/Textures/CorvaxSecrets
# Corvax-Secrets-End

- name: Setup .NET Core
uses: actions/[email protected]
with:
dotnet-version: 8.0.x

- name: Get Engine Tag
run: |
cd RobustToolbox
git fetch --depth=1
- name: Install dependencies
run: dotnet restore

- name: Build Packaging
run: dotnet build Content.Packaging --configuration Release --no-restore /m

- name: Package server
run: dotnet run --project Content.Packaging server --platform win-x64 --platform linux-x64 --platform osx-x64 --platform linux-arm64

- name: Package client
run: dotnet run --project Content.Packaging client --no-wipe-release

- name: Update Build Info
env:
FORK_ID: ${{ vars.FORK_ID }}
run: Tools/gen_build_info.py

- name: Shuffle files around
run: |
mkdir "release/${{ github.sha }}"
mv release/*.zip "release/${{ github.sha }}"
- name: Upload files to mothership
uses: burnett01/[email protected]
with:
switches: -avzr --ignore-existing
path: "release/${{ github.sha }}"
remote_path: ${{ secrets.BUILDS_PATH }}
remote_host: ${{ secrets.BUILDS_HOST }}
remote_user: ${{ secrets.BUILDS_USERNAME }}
remote_key: ${{ secrets.BUILDS_SSH_KEY }}

- name: Update manifest JSON
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.BUILD_HOST }}
username: ${{ secrets.BUILD_USER }}
password: ${{ secrets.BUILD_PASS }}
port: ${{ secrets.BUILD_PORT }}
script: sh update_frontier.sh &> /dev/null
host: ${{ secrets.BUILDS_HOST }}
username: ${{ secrets.BUILDS_USERNAME }}
key: ${{ secrets.BUILDS_SSH_KEY }}
script: node ~/scripts/push_to_manifest.js -fork ${{ vars.FORK_ID }} -id ${{ github.sha }}

0 comments on commit bfc7568

Please sign in to comment.