74 lines
1.9 KiB
YAML
74 lines
1.9 KiB
YAML
name: Build
|
|
|
|
on: [push]
|
|
|
|
env:
|
|
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
|
|
BUILD_TYPE: Release
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: windows-2022
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3.2.0
|
|
with:
|
|
fetch-depth: 0
|
|
submodules: 'true'
|
|
|
|
- name: Download Server
|
|
working-directory: ${{env.GITHUB_WORKSPACE}}
|
|
run: |
|
|
mkdir D:/BDS
|
|
ServerLink=$(cat 'LINK.txt')
|
|
curl -L -o D:/BDS/server.zip "$ServerLink"
|
|
unzip D:/BDS/server.zip -d D:/BDS > /dev/null
|
|
shell: bash
|
|
|
|
- name: Build Library
|
|
working-directory: ${{env.GITHUB_WORKSPACE}}
|
|
run: |
|
|
cd SDK/Tools
|
|
LibraryBuilder.exe -o ..\Lib D:\BDS
|
|
shell: cmd
|
|
|
|
- name: Configure CMake
|
|
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
|
|
|
|
- name: Build
|
|
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
|
|
|
|
- name: MkDirs
|
|
working-directory: ${{env.GITHUB_WORKSPACE}}
|
|
run: |
|
|
mkdir D:/out/plugins
|
|
|
|
- name: Copy Out Files
|
|
working-directory: ${{env.GITHUB_WORKSPACE}}
|
|
run: |
|
|
cp D:/a/Cleaner/Cleaner/build/Release/*.dll D:/out/plugins
|
|
cp D:/a/Cleaner/Cleaner/build/Release/*.pdb D:/out/plugins
|
|
shell: bash
|
|
|
|
- name: Upload plugins
|
|
uses: actions/upload-artifact@v1.0.0
|
|
with:
|
|
name: Cleaner
|
|
path: D:/out/plugins
|
|
|
|
- name: Compress to zip
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
run: |
|
|
7z a D:/out/Cleaner.zip D:/out/plugins
|
|
shell: bash
|
|
|
|
- name: Release
|
|
uses: softprops/action-gh-release@v1
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
with:
|
|
body_path: ${{ github.workspace }}\CHANGELOG.md
|
|
files: |
|
|
D:/out/plugins/Cleaner.dll
|
|
D:/out/plugins/Cleaner.pdb
|
|
D:/out/Cleaner.zip
|