feat: 添加程序集检查到 github action #60
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 workflow will build a .NET project | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net | |
name: .NET | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: change working directory | |
run: cd src | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: | | |
2.0.x | |
2.1.x | |
3.1.x | |
5.0.x | |
6.0.x | |
7.0.x | |
- name: Build | |
run: dotnet build -c Release | |
working-directory: src | |
- name: Check | |
run: dotnet run --project src/AssmeblyCheck/AssmeblyCheck.csproj | |
- name: Test | |
run: dotnet test --no-build --verbosity normal | |
working-directory: src | |
- name: Upload .NET Standard2.0 | |
uses: actions/upload-artifact@v3 | |
with: | |
name: .NET Standard 2.0 | |
path: src/EleCho.GoCqHttpSdk*/bin/Release/netstandard2.0/*.dll | |
- name: Upload .NET 6 | |
uses: actions/upload-artifact@v3 | |
with: | |
name: .NET 6 | |
path: src/EleCho.GoCqHttpSdk*/bin/Release/net6.0/*.dll | |
- name: Upload .NET 7 | |
uses: actions/upload-artifact@v3 | |
with: | |
name: .NET 7 | |
path: src/EleCho.GoCqHttpSdk*/bin/Release/net7.0/*.dll | |