From a155aeb0289e650ca6a68d1b9bf3a9483d5f6edf Mon Sep 17 00:00:00 2001 From: yeziuku <53083103+yeziuku@users.noreply.github.com> Date: Wed, 24 Jul 2024 14:53:19 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E5=8A=A8=E5=8F=91=E5=B8=83=E6=9C=80?= =?UTF-8?q?=E6=96=B0DLL=E5=88=B0latest=E5=88=86=E6=94=AF=20(#75)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 修改工作流 * modify workflow * Update dotnet.yml * 测试完毕 还原master --- .github/workflows/dotnet.yml | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 01c7446..639f4b5 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -15,11 +15,11 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 # Fetch all history for all branches - name: Setup .NET - uses: actions/setup-dotnet@v3 + uses: actions/setup-dotnet@v4 with: dotnet-version: 8.0.x - name: Restore dependencies @@ -28,17 +28,18 @@ jobs: run: dotnet build --no-restore - name: Test run: dotnet test --no-build --verbosity normal - - name: Archive build output + - name: Prepare files for latest branch run: | - mkdir -p build_output - cp -r ./bin/Debug/net8.0/* build_output/ + mkdir -p latest + cp -r ./bin/Debug/net8.0/FunGame.Core.dll ./bin/Debug/net8.0/FunGame.Core.xml ./bin/Debug/net8.0/FunGame.Core.deps.json ./latest/ - name: Commit and push to latest if: success() run: | git config --global user.name "github-actions[bot]" git config --global user.email "github-actions[bot]@users.noreply.github.com" - git checkout latest || git checkout -b latest - cp -r build_output/* . - git add . - git commit -m "Update build output from master" - git push origin latest + git checkout --orphan latest + git rm -rf . + cp -r latest/* . + git add FunGame.Core.dll FunGame.Core.xml FunGame.Core.deps.json + git commit -m "Update latest branch with build outputs" + git push --force origin latest