This repository was archived by the owner on Jul 19, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
87 lines (75 loc) · 2.19 KB
/
Copy pathdotnet.yml
File metadata and controls
87 lines (75 loc) · 2.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: 构建程序
on:
push:
branches:
- '**'
pull_request:
jobs:
Build:
runs-on: ubuntu-latest
strategy:
matrix:
runtimeIdentifier: [ win-x64, linux-x64]
name: 构建 Lagrange.XocMat
steps:
- uses: actions/checkout@v6
with:
submodules: 'recursive'
- name: 初始化.NET 9
uses: actions/setup-dotnet@v5
env:
DOTNET_CLI_UI_LANGUAGE: zh-CN
with:
dotnet-version: 9.0.x
- name: 构建XocMat
run: |
dotnet publish Lagrange.XocMat/Lagrange.XocMat.csproj --no-self-contained -p:PublishSingleFile=true -p:RuntimeIdentifier=${{ matrix.runtimeIdentifier }} --framework net9.0
- name: 上传临时文件
uses: actions/upload-artifact@v7
with:
name: Lagrange.XocMat_${{ matrix.runtimeIdentifier }}_9.0
path: Lagrange.XocMat/bin/Release/net9.0/${{ matrix.runtimeIdentifier }}/publish/
LatestRelease:
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
name: 发布
runs-on: ubuntu-latest
needs: Build
permissions:
contents: write
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: 更新发布标签
run: |
git tag -f V1.3.1
git push -f origin V1.3.1
- name: 下载临时文件
uses: dawidd6/action-download-artifact@v17
with:
path: bin
skip_unpack: true
run_id: ${{ github.run_id }}
- name: 发布Release
uses: ncipollo/release-action@v1
with:
tag: V1.3.1
name: "最新版本"
body: ""
artifacts: |
./bin/*
allowUpdates: true
removeArtifacts: true
ClearTempArtifacts:
name: 清理临时文件
if: github.event_name == 'push' && github.ref == 'refs/heads/master' && always()
runs-on: ubuntu-latest
needs:
- LatestRelease
permissions:
actions: write
steps:
- uses: geekyeggo/delete-artifact@v5
with:
name: |
Artifacts