open action

This commit is contained in:
Qiuzhizhe 2022-10-27 15:13:53 +08:00
parent f82f7108d7
commit 46b0a6460d
No known key found for this signature in database
GPG Key ID: 4EF4BF5521540263
2 changed files with 145 additions and 125 deletions

View File

@ -1,124 +1,144 @@
#name: CMake name: CMake
#
#on: on:
# workflow_dispatch: workflow_dispatch:
# pull_request: pull_request:
# paths: paths:
# - '**.cpp' - '**.cpp'
# - '**.cc' - '**.cc'
# - '**.cxx' - '**.cxx'
# - '**.c' - '**.c'
# - '**.hpp' - '**.hpp'
# - '**.hh' - '**.hh'
# - '**.hxx' - '**.hxx'
# - '**.h' - '**.h'
# - '.github/workflows/cmake.yml' - '.github/workflows/cmake.yml'
# - '**/CMakeLists.txt' - '**/CMakeLists.txt'
#
#env: env:
# BUILD_TYPE: Release BUILD_TYPE: Release
#
#jobs: jobs:
# build: build:
# runs-on: windows-2022 runs-on: windows-2022
#
# steps: steps:
# - uses: actions/checkout@v3.0.2 - uses: actions/checkout@v3.0.2
# with: with:
# fetch-depth: 1 fetch-depth: 1
# #submodules: 'true' #submodules: 'true'
#
# - name: Cache Bedrock Dedicated Server Library - name: Cache Bedrock Dedicated Server Library
# id: cache-bds-lib id: cache-bds-lib
# uses: actions/cache@v3 uses: actions/cache@v3
# env: env:
# cache-name: cache-bds-lib cache-name: cache-bds-lib
# with: with:
# path: | path: |
# ${{ env.GITHUB_WORKSPACE }}LiteLoader/Lib/bedrock_server_api.lib ${{ env.GITHUB_WORKSPACE }}LiteLoader/Lib/bedrock_server_api.lib
# ${{ env.GITHUB_WORKSPACE }}LiteLoader/Lib/bedrock_server_var.lib ${{ env.GITHUB_WORKSPACE }}LiteLoader/Lib/bedrock_server_var.lib
# key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('Scripts/LINK.txt') }} key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('Scripts/LINK.txt') }}
#
# - name: Download Server - name: Download Server
# if: steps.cache-bds-lib.outputs.cache-hit != 'true' if: steps.cache-bds-lib.outputs.cache-hit != 'true'
# working-directory: ${{ env.GITHUB_WORKSPACE }} working-directory: ${{ env.GITHUB_WORKSPACE }}
# run: | run: |
# mkdir Tools/Server mkdir Tools/Server
# ServerLink=$(cat 'Scripts/LINK.txt') ServerLink=$(cat 'Scripts/LINK.txt')
# curl -L -o Tools/Server/server.zip "$ServerLink" curl -L -o Tools/Server/server.zip "$ServerLink"
# unzip Tools/Server/server.zip -d Tools/Server/ > /dev/null unzip Tools/Server/server.zip -d Tools/Server/ > /dev/null
# shell: bash shell: bash
#
# - name: Build Library - name: Build Library
# if: steps.cache-bds-lib.outputs.cache-hit != 'true' if: steps.cache-bds-lib.outputs.cache-hit != 'true'
# working-directory: ${{ env.GITHUB_WORKSPACE }} working-directory: ${{ env.GITHUB_WORKSPACE }}
# run: | run: |
# cd Tools cd Tools
# LibraryBuilder.exe Server LibraryBuilder.exe Server
# shell: cmd shell: cmd
#
# - name: Change LITELOADER_VERSION_STATUS_BETA - name: Change LITELOADER_VERSION_STATUS_BETA
# working-directory: ${{ env.GITHUB_WORKSPACE }} working-directory: ${{ env.GITHUB_WORKSPACE }}
# if: false == startsWith(github.ref, 'refs/tags/') if: false == startsWith(github.ref, 'refs/tags/')
# run: | run: |
# sed -r -i 's/#define\s+LITELOADER_VERSION_STATUS\s+LITELOADER_VERSION_\w+/#define LITELOADER_VERSION_STATUS LITELOADER_VERSION_BETA/' LiteLoader/Main/Version.h sed -r -i 's/#define\s+LITELOADER_VERSION_STATUS\s+LITELOADER_VERSION_\w+/#define LITELOADER_VERSION_STATUS LITELOADER_VERSION_BETA/' LiteLoader/Main/Version.h
# sed -r -i 's/#define\s+LITELOADER_VERSION_ACTIONS\s+.*/#define LITELOADER_VERSION_ACTIONS ${{ github.run_number }}\r/' LiteLoader/Main/Version.h sed -r -i 's/#define\s+LITELOADER_VERSION_ACTIONS\s+.*/#define LITELOADER_VERSION_ACTIONS ${{ github.run_number }}\r/' LiteLoader/Main/Version.h
# cat LiteLoader/Main/Version.h cat LiteLoader/Main/Version.h
# shell: bash shell: bash
#
# - name: Change LITELOADER_VERSION_STATUS_RELEASE - name: Change LITELOADER_VERSION_STATUS_RELEASE
# working-directory: ${{ env.GITHUB_WORKSPACE }} working-directory: ${{ env.GITHUB_WORKSPACE }}
# if: startsWith(github.ref, 'refs/tags/') if: startsWith(github.ref, 'refs/tags/')
# run: | run: |
# sed -r -i 's/#define\s+LITELOADER_VERSION_STATUS\s+LITELOADER_VERSION_\w+/#define LITELOADER_VERSION_STATUS LITELOADER_VERSION_RELEASE/' LiteLoader/Main/Version.h sed -r -i 's/#define\s+LITELOADER_VERSION_STATUS\s+LITELOADER_VERSION_\w+/#define LITELOADER_VERSION_STATUS LITELOADER_VERSION_RELEASE/' LiteLoader/Main/Version.h
# sed -r -i 's/#define\s+LITELOADER_VERSION_ACTIONS\s+.*/#define LITELOADER_VERSION_ACTIONS ${{ github.run_number }}\r/' LiteLoader/Main/Version.h sed -r -i 's/#define\s+LITELOADER_VERSION_ACTIONS\s+.*/#define LITELOADER_VERSION_ACTIONS ${{ github.run_number }}\r/' LiteLoader/Main/Version.h
# shell: bash shell: bash
#
# - name: Get MSVC Path - name: Get MSVC Path
# working-directory: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\ working-directory: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\
# run: echo "MSVC_VER=$(ls | tail -n 1)" >> $GITHUB_ENV run: echo "MSVC_VER=$(ls | tail -n 1)" >> $GITHUB_ENV
# shell: bash shell: bash
#
# - name: Configure CMake(MSVC) - name: Configure CMake(MSVC)
# run: | run: |
# cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
# shell: cmd shell: cmd
#
# - name: Build - name: Build
# run: | run: |
# cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
# shell: cmd shell: cmd
#
# - name: Configure CMake(ClangCL) - name: Configure CMake(ClangCL)
# run: | run: |
# cmake -B ${{github.workspace}}/build_clang -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -T clangcl cmake -B ${{github.workspace}}/build_clang -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -T clangcl
# shell: cmd shell: cmd
#
# - name: Build SymDBHelper - name: Build SymDBHelper
# run: cmake --build ${{github.workspace}}/build_clang --config ${{env.BUILD_TYPE}} --target SymDBHelper run: cmake --build ${{github.workspace}}/build_clang --config ${{env.BUILD_TYPE}} --target SymDBHelper
#
# - name: Pack Release - name: Pack Release
# working-directory: ${{ env.GITHUB_WORKSPACE }} working-directory: ${{ env.GITHUB_WORKSPACE }}
# run: | run: |
# cd Scripts cd Scripts
# ./PackRelease.cmd action ./PackRelease.cmd action
# shell: cmd shell: cmd
#
# - name: Move PDB to path - name: Move PDB to path
# working-directory: ${{ env.GITHUB_WORKSPACE }} working-directory: ${{ env.GITHUB_WORKSPACE }}
# run: | run: |
# mkdir PDB mkdir PDB
# cp x64/Release/*.pdb PDB cp x64/Release/*.pdb PDB
# shell: bash shell: bash
#
# - name: Upload LiteLoader - name: Upload LiteLoader
# uses: actions/upload-artifact@v3.1.0 uses: actions/upload-artifact@v3.1.0
# with: with:
# name: LiteLoader name: LiteLoader
# path: ${{ github.workspace }}\RELEASE\ path: ${{ github.workspace }}\RELEASE\
#
# - name: Upload PDB - name: Upload PDB
# uses: actions/upload-artifact@v3.1.0 uses: actions/upload-artifact@v3.1.0
# with: with:
# name: PDB name: PDB
# path: ${{ github.workspace }}\PDB path: ${{ github.workspace }}\PDB
- name: Prepare for creating Release
working-directory: ${{ env.GITHUB_WORKSPACE }}
id: rel
if: startsWith(github.ref, 'refs/tags/')
run: |
echo ::set-output name=tag::${GITHUB_REF#refs/*/}
mv LiteLoader.zip LiteLoader-${GITHUB_REF#refs/*/}.zip
shell: bash
- name: Create New Release
uses: softprops/action-gh-release@v0.1.14
if: startsWith(github.ref, 'refs/tags/')
with:
body_path: ${{ github.workspace }}\CHANGELOG.md
files: |
${{ github.workspace }}\LiteLoader-${{ steps.rel.outputs.tag }}.zip
${{ github.workspace }}\PDB.zip
env:
GITHUB_REPOSITORY: quizhizhe/LiteLoaderBDS-1.16.40

View File

@ -1 +1 @@
https://minecraft.azureedge.net/bin-win/bedrock-server-1.19.21.01.zip https://minecraft.azureedge.net/bin-win/bedrock-server-1.16.40.02.zip