Skip to content

Commit

Permalink
Move content builds to github actions and centcomm
Browse files Browse the repository at this point in the history
  • Loading branch information
PJB3005 committed Mar 4, 2021
1 parent 0db42c8 commit 02355a9
Show file tree
Hide file tree
Showing 7 changed files with 87 additions and 209 deletions.
25 changes: 0 additions & 25 deletions .github/workflows/fire-jenkins.yml

This file was deleted.

49 changes: 49 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Publish

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.200

- name: Package client
run: |
Tools/package_server_build.py -p win-x64 -p linux-x64 -p osx-x64 -p linux-arm64
Tools/package_client_build.py
- name: Shuffle files around
run: |
mkdir "release/${{ github.sha }}"
mv release/*.zip "release/${{ github.sha }}"
- name: Upload files to centcomm
uses: appleboy/scp-action@master
with:
host: centcomm.spacestation14.io
username: wizards-build-push
key: ${{ secrets.CENTCOMM_WIZARDS_BUILDS_PUSH_KEY }}
source: "release/${{ github.sha }}"
target: "/mnt/ext/wizards-builds/builds/"
strip_components: 1

- name: Update manifest JSON
uses: appleboy/ssh-action@master
with:
host: centcomm.spacestation14.io
username: wizards-build-push
key: ${{ secrets.CENTCOMM_WIZARDS_BUILDS_PUSH_KEY }}
script: /home/wizards-build-push/push.ps1 ${{ github.sha }}

32 changes: 0 additions & 32 deletions Jenkinsfile

This file was deleted.

4 changes: 4 additions & 0 deletions Resources/Changelog/Parts/builds.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
author: PJB
changes:
- message: Moved content builds over to a better server and threw it behind Cloudflare caching. Should download MUCH faster now!
type: Tweak
1 change: 0 additions & 1 deletion SpaceStation14.sln
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{806ED41A
.appveyor.yml = .appveyor.yml
Tools\gen_build_info.py = Tools\gen_build_info.py
Tools\generate_hashes.ps1 = Tools\generate_hashes.ps1
Jenkinsfile = Jenkinsfile
Tools\package_client_build.py = Tools\package_client_build.py
Tools\package_server_build.py = Tools\package_server_build.py
EndProjectSection
Expand Down
17 changes: 8 additions & 9 deletions Tools/gen_build_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@
FILE = "SS14.Client.zip"

SERVER_FILES = [
"SS14.Server_Linux_x64.zip",
"SS14.Server_Linux_ARM64.zip",
"SS14.Server_Windows_x64.zip",
"SS14.Server_macOS_x64.zip"
"SS14.Server_linux-x64.zip",
"SS14.Server_linux-arm64.zip",
"SS14.Server_win-x64.zip",
"SS14.Server_osx-x64.zip"
]

VERSION = os.environ['GITHUB_SHA']
FORK_ID = "wizards"

BUILD_URL = f"https://central.spacestation14.io/builds/wizards/builds/{VERSION}/{FILE}"

def main() -> None:
manifest = generate_manifest("release")
Expand All @@ -35,15 +36,13 @@ def inject_manifest(zip_path: str, manifest: str) -> None:
def generate_manifest(dir: str) -> str:
# Env variables set by Jenkins.

version = os.environ["BUILD_NUMBER"]
download = f"{os.environ['BUILD_URL']}artifact/release/{FILE}"
hash = sha256_file(os.path.join(dir, FILE))
engine_version = get_engine_version()

return json.dumps({
"download": download,
"download": BUILD_URL,
"hash": hash,
"version": version,
"version": VERSION,
"fork_id": FORK_ID,
"engine_version": engine_version
})
Expand Down
Loading

0 comments on commit 02355a9

Please sign in to comment.