From 0bca53bdcac9f4d9fbe6f8e6ac436d50cf02c41f Mon Sep 17 00:00:00 2001 From: ThetaOmega01 <60931870+ThetaOmega01@users.noreply.github.com> Date: Fri, 9 Aug 2024 17:45:10 +0800 Subject: [PATCH] Add github actions (#1) Update workflow --- .github/workflows/dotnet.yml | 38 ++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/dotnet.yml diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml new file mode 100644 index 0000000..07b056c --- /dev/null +++ b/.github/workflows/dotnet.yml @@ -0,0 +1,38 @@ +# 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: ZZZBotris.Net CI + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + + build: + strategy: + matrix: + os: [ ubuntu, windows, macos ] + runs-on: ${{matrix.os}}-latest + + steps: + - uses: actions/checkout@v4 + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 8.0.x + - name: Install Dependencies + run: dotnet restore + - name: Publish + run: | + mkdir ./pub + dotnet publish ZZZTOJ.Botris -p:PublishSingleFile=true --self-contained false -o ./pub + - name: Remove pdb files + run: rm ./pub/*.pdb + - name: Upload dotnet test results + uses: actions/upload-artifact@v4 + with: + name: ZZZBotris_${{ matrix.os }} + path: ./pub