mirror of
https://github.com/project-redbud/FunGame-Core.git
synced 2025-12-05 08:09:02 +00:00
自动发布最新DLL到latest分支 (#75)
* 修改工作流 * modify workflow * Update dotnet.yml * 测试完毕 还原master
This commit is contained in:
parent
d8c08957a4
commit
a155aeb028
21
.github/workflows/dotnet.yml
vendored
21
.github/workflows/dotnet.yml
vendored
@ -15,11 +15,11 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0 # Fetch all history for all branches
|
fetch-depth: 0 # Fetch all history for all branches
|
||||||
- name: Setup .NET
|
- name: Setup .NET
|
||||||
uses: actions/setup-dotnet@v3
|
uses: actions/setup-dotnet@v4
|
||||||
with:
|
with:
|
||||||
dotnet-version: 8.0.x
|
dotnet-version: 8.0.x
|
||||||
- name: Restore dependencies
|
- name: Restore dependencies
|
||||||
@ -28,17 +28,18 @@ 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
|
- name: Prepare files for latest branch
|
||||||
run: |
|
run: |
|
||||||
mkdir -p build_output
|
mkdir -p latest
|
||||||
cp -r ./bin/Debug/net8.0/* build_output/
|
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
|
- name: Commit and push to latest
|
||||||
if: success()
|
if: success()
|
||||||
run: |
|
run: |
|
||||||
git config --global user.name "github-actions[bot]"
|
git config --global user.name "github-actions[bot]"
|
||||||
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
||||||
git checkout latest || git checkout -b latest
|
git checkout --orphan latest
|
||||||
cp -r build_output/* .
|
git rm -rf .
|
||||||
git add .
|
cp -r latest/* .
|
||||||
git commit -m "Update build output from master"
|
git add FunGame.Core.dll FunGame.Core.xml FunGame.Core.deps.json
|
||||||
git push origin latest
|
git commit -m "Update latest branch with build outputs"
|
||||||
|
git push --force origin latest
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user