forked from SweetSmellFox/MFAWPF
-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (32 loc) · 951 Bytes
/
Release.yml
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
name: Release
on:
push:
tags:
- 'v*' # 匹配以'v'开头的tag
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0 # 获取完整历史记录以访问所有tags
- name: .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 8.0.x
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release
- name: Zip
run: |
cd /home/runner/work/MFAWPF/bin/AnyCPU/Release/
zip -r ../MFAWPF-${{ github.ref_name }}.zip *
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
tag_name: ${{ github.ref_name }}
files: |
/home/runner/work/MFAWPF/bin/AnyCPU/*.zip