mirror of
https://github.com/Gurge44/EndlessHostRoles.git
synced 2026-10-20 01:46:25 +00:00
* release workflow * update release workflow * remove changelog input entirely * dotnet 6.0 * create test version without crowdin * give test name... * fix file paths * enable windows targeting to build on linux? * copy CustomRoles.cs to CTA before build * copy from the right folder... * rename challenger to solopvp_player * temporary customroles fix * fix bepinex link * remove packaging, fix download links, finito? * i am so silly * bro cannot read * sure, this'll work * surely this one * attempt to cache bepinex * ... actually rename solopvp_player to challenger * optimisations * less steps hopefully fixing permission problems * will a trailing slash solve my problems * a few dots for good measure * why am i making this so difficult * remove added line * split things up more to do msbuild on windows * why does it keep changing the paths * restore nuget packages * CORRECT PATHS * use dotnet instead of nuget cope * apparently that checkout was quite important * add runtime identifier back * fix name * rename control panel * actually use nuget?? * .NEt again D: * remove imaginary line * test * IT BUILT * cds nuts * remove this line again for testing * final path change * changelog output * please find my exe * fix backticks * final final path change * make the build dir? * new changelog * fix string parsing * better changelog * lol * enable crowdin action * rename challenger to solopvp_player * ... actually rename solopvp_player to challenger * optimisations * less steps hopefully fixing permission problems * will a trailing slash solve my problems * a few dots for good measure * why am i making this so difficult * remove added line * split things up more to do msbuild on windows * why does it keep changing the paths * restore nuget packages * CORRECT PATHS * use dotnet instead of nuget cope * apparently that checkout was quite important * add runtime identifier back * fix name * rename control panel * actually use nuget?? * .NEt again D: * remove imaginary line * test * IT BUILT * cds nuts * remove this line again for testing * final path change * changelog output * please find my exe * fix backticks * final final path change * make the build dir? * new changelog * fix string parsing * better changelog * lol * enable crowdin action * cleanup * build with .NET 6, use bepinex pre-release 735, add configs * disable crowdin temporarily * checkout for packaging * make config dir * woohoo! uncommenting crowdin
207 lines
6.3 KiB
YAML
207 lines
6.3 KiB
YAML
name: Build & Release EHR
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
version:
|
|
description: "Version (e.g. 7.0.2)"
|
|
required: true
|
|
|
|
jobs:
|
|
prepare-build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Sync translations from Crowdin
|
|
uses: crowdin/github-action@v2
|
|
with:
|
|
upload_sources: false
|
|
download_translations: true
|
|
config: crowdin.yml
|
|
push_translations: true
|
|
commit_message: "chore: update translations for release ${{ github.event.inputs.version }}"
|
|
env:
|
|
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
# ---------------------------------------------------------
|
|
# 1) Build EHR on Linux
|
|
# ---------------------------------------------------------
|
|
build-ehr:
|
|
runs-on: ubuntu-latest
|
|
needs: [prepare-build]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup .NET
|
|
uses: actions/setup-dotnet@v4
|
|
with:
|
|
dotnet-version: 6.0.x
|
|
|
|
- name: Build EHR
|
|
run: dotnet build EHR.csproj -c Release -o build/
|
|
|
|
- name: Upload EHR artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: ehr
|
|
path: build/EHR.dll
|
|
|
|
# ---------------------------------------------------------
|
|
# 2) Build Control Panel on Windows using MSBuild
|
|
# ---------------------------------------------------------
|
|
build-control-panel:
|
|
runs-on: windows-latest
|
|
needs: [prepare-build]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup .NET
|
|
uses: actions/setup-dotnet@v4
|
|
with:
|
|
dotnet-version: 6.0.x
|
|
|
|
- name: Setup MSBuild
|
|
uses: microsoft/setup-msbuild@v2
|
|
|
|
- name: Restore .NET packages
|
|
run: dotnet restore -p:SelfContained=true CTA/CustomTeamAssigner/CustomTeamAssigner.csproj
|
|
|
|
- name: Build Control Panel (MSBuild)
|
|
run: |
|
|
msbuild CTA/CustomTeamAssigner/CustomTeamAssigner.csproj `
|
|
/p:Configuration=Release `
|
|
/p:Platform="x64" `
|
|
/p:PublishSingleFile=true `
|
|
/p:SelfContained=true `
|
|
/p:RuntimeIdentifier=win-x64 `
|
|
/p:IncludeAllContentForSelfExtract=true `
|
|
/p:DebugType=None `
|
|
/p:PublishDir=build\ `
|
|
/t:publish
|
|
|
|
- name: Rename exe file
|
|
run: |
|
|
mkdir build/
|
|
mv CTA/CustomTeamAssigner/build/CustomTeamAssigner.exe build/EHR_Control-Panel_BETA.exe
|
|
|
|
- name: Upload Control Panel artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: control-panel
|
|
path: build\EHR_Control-Panel_BETA.exe
|
|
|
|
# ---------------------------------------------------------
|
|
# 3) Package everything on Linux
|
|
# ---------------------------------------------------------
|
|
package:
|
|
runs-on: ubuntu-latest
|
|
needs: [build-ehr, build-control-panel]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Download EHR artifact
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: ehr
|
|
path: artifacts/ehr
|
|
|
|
- name: Prepare release folder
|
|
run: mkdir -p release
|
|
|
|
- name: Download BepInEx 6 pre-release 735
|
|
run: |
|
|
curl -L https://builds.bepinex.dev/projects/bepinex_be/735/BepInEx-Unity.IL2CPP-win-x64-6.0.0-be.735%2B5fef357.zip -o bepinex.zip
|
|
unzip bepinex.zip -d release
|
|
chmod -R u+rwX,go+rX release
|
|
|
|
- name: Copy EHR dll to plugins
|
|
run: cp artifacts/ehr/EHR.dll release/BepInEx/plugins/
|
|
|
|
- name: Copy configs to BepInEx config
|
|
run: |
|
|
mkdir -p release/BepInEx/config/
|
|
cp packaging/* release/BepInEx/config/
|
|
|
|
- name: Download modded regions DLL to plugins
|
|
run: curl -L https://github.com/miniduikboot/Mini.RegionInstall/releases/download/v1.2.0/Mini.RegionInstall.dll -o release/BepInEx/plugins/Mini.RegionInstall.dll
|
|
|
|
- name: Create Epic/MS Store ZIP
|
|
run: |
|
|
cd release
|
|
zip -r "../EHR.v${{ github.event.inputs.version }}_Epic-Games_Microsoft-Store.zip" .
|
|
|
|
- name: Create Steam ZIP
|
|
run: |
|
|
echo "945360" > steam_appid.txt
|
|
zip -r "EHR.v${{ github.event.inputs.version }}_Steam.zip" .
|
|
|
|
- name: Upload release artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: final-zips
|
|
path: ./EHR*.zip
|
|
|
|
# ---------------------------------------------------------
|
|
# 4) Create GitHub Release
|
|
# ---------------------------------------------------------
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
needs: [package]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
# -----------------------------
|
|
# Download all artifacts
|
|
# -----------------------------
|
|
- name: Download packaged ZIPs
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: final-zips
|
|
path: release-artifacts/zips
|
|
|
|
- name: Download EHR.dll
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: ehr
|
|
path: release-artifacts/ehr
|
|
|
|
- name: Download Control Panel EXE
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: control-panel
|
|
path: release-artifacts/control-panel
|
|
|
|
# -----------------------------
|
|
# Create GitHub Release
|
|
# -----------------------------
|
|
- name: Create Release
|
|
uses: softprops/action-gh-release@v2
|
|
with:
|
|
tag_name: "v${{ github.event.inputs.version }}"
|
|
name: "EHR v${{ github.event.inputs.version }}"
|
|
generate_release_notes: true
|
|
body: ${cat CHANGELOG.md}
|
|
files: |
|
|
release-artifacts/zips/*
|
|
release-artifacts/ehr/EHR.dll
|
|
release-artifacts/control-panel/*.exe
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
# -----------------------------
|
|
# Send Mod News
|
|
# -----------------------------
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: 3.x
|
|
|
|
- name: Install dependencies
|
|
run: pip install requests markdown
|
|
|
|
- name: Run script and send ModNews
|
|
env:
|
|
MODNEWS_API_URL: ${{ secrets.MODNEWS_API_URL }}
|
|
MODNEWS_API_TOKEN: ${{ secrets.MODNEWS_API_TOKEN }}
|
|
run: python release_to_modnews.py |