🔧 build(Github Actions): 调整 构建脚本 #3
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 | |
run-name: ${{ github.actor }} is publishing a nuget package 🚀 | |
jobs: | |
build: | |
if: github.ref_name == 'main' | |
name: Build | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [windows-latest, ubuntu-latest, macos-latest] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.x | |
- name: Install FlubuCore | |
run: dotnet tool install --global FlubuCore.Tool --version 8.0.0 | |
- name: Build | |
run: flubu Build | |
- name: Test | |
run: flubu test | |
- name: pack | |
run: flubu nuget.publish -nugetKey=${{ secrets.NUGET_API_KEY }} -env=prod |