mirror of
https://github.com/project-redbud/FunGame-Core.git
synced 2025-04-22 03:59:35 +08:00
修改工作流
This commit is contained in:
parent
59f2edcac8
commit
d8c08957a4
18
.github/workflows/dotnet.yml
vendored
18
.github/workflows/dotnet.yml
vendored
@ -1,4 +1,4 @@
|
|||||||
# This workflow will build a .NET project
|
# This workflow will build a .NET project and push the built files to the latest branch
|
||||||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
|
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
|
||||||
|
|
||||||
name: .NET
|
name: .NET
|
||||||
@ -16,6 +16,8 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0 # Fetch all history for all branches
|
||||||
- name: Setup .NET
|
- name: Setup .NET
|
||||||
uses: actions/setup-dotnet@v3
|
uses: actions/setup-dotnet@v3
|
||||||
with:
|
with:
|
||||||
@ -26,3 +28,17 @@ jobs:
|
|||||||
run: dotnet build --no-restore
|
run: dotnet build --no-restore
|
||||||
- name: Test
|
- name: Test
|
||||||
run: dotnet test --no-build --verbosity normal
|
run: dotnet test --no-build --verbosity normal
|
||||||
|
- name: Archive build output
|
||||||
|
run: |
|
||||||
|
mkdir -p build_output
|
||||||
|
cp -r ./bin/Debug/net8.0/* build_output/
|
||||||
|
- 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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user