Publishing workflow for Vulture Test server (#35009)
* Publishing workflow for Vulture Test server * Remove dep install from workflow Not necessary since changelogs don't happen
This commit is contained in:
committed by
GitHub
parent
082b1f8979
commit
360794eb3a
45
.github/workflows/publish-testing.yml
vendored
Normal file
45
.github/workflows/publish-testing.yml
vendored
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
name: Publish Testing
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: publish-testing
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
schedule:
|
||||||
|
- cron: '0 10 * * *'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3.6.0
|
||||||
|
with:
|
||||||
|
submodules: 'recursive'
|
||||||
|
- name: Setup .NET Core
|
||||||
|
uses: actions/setup-dotnet@v3.2.0
|
||||||
|
with:
|
||||||
|
dotnet-version: 9.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: Publish version
|
||||||
|
run: Tools/publish_multi_request.py --fork-id wizards-testing
|
||||||
|
env:
|
||||||
|
PUBLISH_TOKEN: ${{ secrets.PUBLISH_TOKEN }}
|
||||||
|
GITHUB_REPOSITORY: ${{ vars.GITHUB_REPOSITORY }}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
import argparse
|
||||||
import requests
|
import requests
|
||||||
import os
|
import os
|
||||||
import subprocess
|
import subprocess
|
||||||
@@ -18,6 +19,12 @@ ROBUST_CDN_URL = "https://wizards.cdn.spacestation14.com/"
|
|||||||
FORK_ID = "wizards"
|
FORK_ID = "wizards"
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
parser = argparse.ArgumentParser()
|
||||||
|
parser.add_argument("--fork-id", default=FORK_ID)
|
||||||
|
|
||||||
|
args = parser.parse_args()
|
||||||
|
fork_id = args.fork_id
|
||||||
|
|
||||||
session = requests.Session()
|
session = requests.Session()
|
||||||
session.headers = {
|
session.headers = {
|
||||||
"Authorization": f"Bearer {PUBLISH_TOKEN}",
|
"Authorization": f"Bearer {PUBLISH_TOKEN}",
|
||||||
@@ -32,7 +39,7 @@ def main():
|
|||||||
headers = {
|
headers = {
|
||||||
"Content-Type": "application/json"
|
"Content-Type": "application/json"
|
||||||
}
|
}
|
||||||
resp = session.post(f"{ROBUST_CDN_URL}fork/{FORK_ID}/publish/start", json=data, headers=headers)
|
resp = session.post(f"{ROBUST_CDN_URL}fork/{fork_id}/publish/start", json=data, headers=headers)
|
||||||
resp.raise_for_status()
|
resp.raise_for_status()
|
||||||
print("Publish successfully started, adding files...")
|
print("Publish successfully started, adding files...")
|
||||||
|
|
||||||
@@ -44,7 +51,7 @@ def main():
|
|||||||
"Robust-Cdn-Publish-File": os.path.basename(file),
|
"Robust-Cdn-Publish-File": os.path.basename(file),
|
||||||
"Robust-Cdn-Publish-Version": VERSION
|
"Robust-Cdn-Publish-Version": VERSION
|
||||||
}
|
}
|
||||||
resp = session.post(f"{ROBUST_CDN_URL}fork/{FORK_ID}/publish/file", data=f, headers=headers)
|
resp = session.post(f"{ROBUST_CDN_URL}fork/{fork_id}/publish/file", data=f, headers=headers)
|
||||||
|
|
||||||
resp.raise_for_status()
|
resp.raise_for_status()
|
||||||
|
|
||||||
@@ -56,7 +63,7 @@ def main():
|
|||||||
headers = {
|
headers = {
|
||||||
"Content-Type": "application/json"
|
"Content-Type": "application/json"
|
||||||
}
|
}
|
||||||
resp = session.post(f"{ROBUST_CDN_URL}fork/{FORK_ID}/publish/finish", json=data, headers=headers)
|
resp = session.post(f"{ROBUST_CDN_URL}fork/{fork_id}/publish/finish", json=data, headers=headers)
|
||||||
resp.raise_for_status()
|
resp.raise_for_status()
|
||||||
|
|
||||||
print("SUCCESS!")
|
print("SUCCESS!")
|
||||||
|
|||||||
Reference in New Issue
Block a user