Update v1.2.0.0 #554
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: AutoBuild .NET | |
concurrency: | |
group: ${{ github.ref }} | |
cancel-in-progress: true | |
on: [push, pull_request, workflow_dispatch] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.nuget/packages | |
~/.cache/bepinex | |
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-nuget- | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.x | |
- name: Install dependencies | |
run: | | |
dotnet --info | |
sudo apt update | |
sudo apt install wget unzip -y | |
- name: Download and Unzip BepInEx | |
run: | | |
wget https://builds.bepinex.dev/projects/bepinex_be/725/BepInEx-Unity.IL2CPP-win-x86-6.0.0-be.725%2Be1974e2.zip -O BepInEx.zip | |
unzip BepInEx.zip -d ./Release/ | |
sudo chmod -R 777 ./Release | |
- name: Download and Unzip ExtraData | |
run: | | |
wget https://raw.githubusercontent.com/mxyx-club/ExtraData/main/ExtraData.zip -O ExtraData.zip | |
unzip ExtraData.zip -d ./Release/ | |
- name: Download Reactor | |
run: wget https://github.com/NuclearPowered/Reactor/releases/download/2.3.1/Reactor.dll -P ./Release/BepInEx/plugins | |
- name: Set Build Configuration | |
id: set-config | |
run: | | |
if [[ "${{ github.ref }}" == refs/tags/* ]]; then | |
echo "config=Release" >> $GITHUB_ENV | |
else | |
echo "config=Beta" >> $GITHUB_ENV | |
fi | |
- name: Build | |
run: dotnet build TheOtherRoles/TheOtherRoles.csproj --configuration ${{ env.config }} --output ./Release/BepInEx/plugins | |
- name: Cleanup | |
run: | | |
rm -rf ./Release/BepInEx/plugins/TheOtherUs.deps.json | |
rm -rf ./Release/BepInEx/plugins/TheOtherUs.pdb | |
rm -rf ./Release/changelog.txt | |
- name: Upload TheOtherUsDll | |
uses: actions/[email protected] | |
with: | |
name: TheOtherUs.dll | |
path: ./Release/BepInEx/plugins/TheOtherUs.dll | |
- name: Upload TheOtherUs | |
uses: actions/[email protected] | |
with: | |
name: TheOtherUs | |
path: ./Release/ | |
release: | |
needs: build | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'refs/tags/') | |
steps: | |
- name: Download Build Artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: TheOtherUs | |
- name: Compress subdirectories | |
run: | | |
ls -R | |
zip -q -r TheOtherUs.zip * | |
mv ./BepInEx/plugins/TheOtherUs.dll ./ | |
- name: Extract version from tag | |
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV | |
- name: Clone Changes Log | |
run: | | |
wget https://raw.githubusercontent.com/mxyx-club/TheOtherUs-Edited/v${{ env.VERSION }}/CHANGELOG.md -O CHANGELOG.md | |
- name: Create GitHub Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
name: "TheOtherUs-Edited v${{ env.VERSION }}" | |
body_path: CHANGELOG.md | |
files: | | |
TheOtherUs.dll | |
./TheOtherUs.zip | |
draft: false | |
prerelease: false |