在链式调用中增加.If()方法 #158
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: .NET | |
on: | |
push: | |
branches: [ "2.4" ] | |
pull_request: | |
branches: [ "2.4" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 6.0.x | |
- name: Restore dependencies | |
run: dotnet restore | |
- name: Build | |
run: dotnet build --no-restore | |
- name: Push package | |
run: | | |
# Grab some versioning information | |
commithash=$(git rev-parse --short HEAD) | |
currtime=$(date +%s) | |
echo "commit hash is $commithash" | |
echo "time is $currtime" | |
# Enter project directory | |
cd Mirai.Net | |
# Build package | |
dotnet restore | |
dotnet build | |
# Pack a nuget package with all the default config | |
dotnet pack | |
# Enter package output directory | |
cd bin/Debug | |
# Getting file named with .nupkg extension | |
file="" | |
cdir=`ls ./*.nupkg` | |
for eachfile in $cdir | |
do | |
file=$eachfile | |
done | |
# Push it to source "nuget" | |
dotnet nuget push $file --api-key ${{ secrets.NUGET_KEY }} --source "nuget" --skip-duplicate |