forked from LagrangeDev/Lagrange.Core
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/LagrangeDev/Lagrange.Core
- Loading branch information
Showing
64 changed files
with
254 additions
and
2,232 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
name: Lagrange.OneBot Release | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
Build: | ||
runs-on: windows-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: Install .NET | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: '8.0.x' | ||
|
||
- name: Build Lagrange.OneBot .NET 8.0 | ||
shell: powershell | ||
run: | | ||
dotnet publish Lagrange.OneBot/Lagrange.OneBot.csproj --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 8.0 | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: Lagrange.OneBot_${{ matrix.runtimeIdentifier }}_8.0 | ||
path: Lagrange.OneBot/bin/Release/net8.0/${{ matrix.runtimeIdentifier }}/publish | ||
|
||
- name: Compress files | ||
run: Compress-Archive -Path 'Lagrange.OneBot\bin\Release\net8.0\${{ matrix.runtimeIdentifier }}\publish' -DestinationPath 'Lagrange.OneBot_${{ matrix.runtimeIdentifier }}_net8.0_SelfContained.zip' | ||
|
||
- name: Prepare release files | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: Lagrange.OneBot_all | ||
path: Lagrange.OneBot_${{ matrix.runtimeIdentifier }}_net8.0_SelfContained.zip | ||
|
||
NightlyRelease: | ||
name: Nightly Release | ||
runs-on: ubuntu-latest | ||
needs: Build | ||
permissions: | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Update Nightly Tag | ||
run: | | ||
git tag -f nightly | ||
git push -f origin nightly | ||
- name: Download Artifacts | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: Lagrange.OneBot_all | ||
path: ./bin | ||
- name: Update Nightly Release | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
tag: nightly | ||
name: "Nightly Release" | ||
prerelease: true | ||
body: "> ⚠️This is a nightly release.\n> ⚠️This is not the latest version." | ||
artifacts: | | ||
./bin/* | ||
allowUpdates: true | ||
removeArtifacts: true | ||
|
||
ClearTempArtifacts: | ||
name: Clear Temp Artifacts | ||
if: always() | ||
runs-on: ubuntu-latest | ||
needs: | ||
- NightlyRelease | ||
permissions: | ||
actions: write | ||
steps: | ||
- uses: geekyeggo/delete-artifact@v2 | ||
with: | ||
name: | | ||
Lagrange.OneBot_all |
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.