feat: 合并上游最新代码,同时支持25765版本的签名 #32
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: Lagrange.OneBot Build | |
on: | |
push: | |
branches: | |
- master | |
paths: | |
- "Lagrange.Core/**" | |
- "Lagrange.OneBot/**" | |
- "Lagrange.Core.sln" | |
- "LICENSE" | |
- "!Lagrange.OneBot/Resources/Dockerfile" | |
- "!Lagrange.OneBot/Resources/docker-entrypoint.sh" | |
pull_request: | |
branches: | |
- master | |
paths: | |
- "Lagrange.Core/**" | |
- "Lagrange.OneBot/**" | |
- "Lagrange.Core.sln" | |
- "LICENSE" | |
- "!Lagrange.OneBot/Resources/Dockerfile" | |
- "!Lagrange.OneBot/Resources/docker-entrypoint.sh" | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
runtimeIdentifier: | |
[ | |
win-x64, | |
win-x86, | |
linux-x64, | |
linux-arm, | |
linux-arm64, | |
osx-x64, | |
osx-arm64, | |
linux-musl-x64, | |
linux-musl-arm, | |
linux-musl-arm64, | |
] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set secret | |
env: | |
MY_ENV_VAR: ${{ secrets.KEY }} | |
run: | | |
sed -i 's#$(SIGN_SERVER_DEFAULT)#'"${MY_ENV_VAR}"'#g' 'Lagrange.OneBot/Utility/OneBotSigner.cs' | |
- name: Install .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: '8.0.x' | |
- name: Build Lagrange.OneBot .NET 7.0 | |
run: dotnet publish Lagrange.OneBot/Lagrange.OneBot.csproj --no-self-contained -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true -p:DebugType=none -p:RuntimeIdentifier=${{ matrix.runtimeIdentifier }} --framework net7.0 | |
- name: Build Lagrange.OneBot .NET 8.0 | |
run: dotnet publish Lagrange.OneBot/Lagrange.OneBot.csproj --no-self-contained -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true -p:DebugType=none -p:RuntimeIdentifier=${{ matrix.runtimeIdentifier }} --framework net8.0 | |
- name: Upload binary files(${{ matrix.runtimeIdentifier }}) for .NET 7.0 | |
uses: actions/upload-artifact@v4 | |
if: github.event_name != 'pull_request' | |
with: | |
name: Lagrange.OneBot_${{ matrix.runtimeIdentifier }}_net7.0_NoSelfContained | |
path: Lagrange.OneBot/bin/Debug/net7.0/${{ matrix.runtimeIdentifier }}/publish | |
- name: Upload binary files(${{ matrix.runtimeIdentifier }}) for .NET 8.0 | |
uses: actions/upload-artifact@v4 | |
if: github.event_name != 'pull_request' | |
with: | |
name: Lagrange.OneBot_${{ matrix.runtimeIdentifier }}_net8.0_NoSelfContained | |
path: Lagrange.OneBot/bin/Release/net8.0/${{ matrix.runtimeIdentifier }}/publish |