-
Notifications
You must be signed in to change notification settings - Fork 13
61 lines (49 loc) · 1.64 KB
/
dotnet-desktop.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: .NET Desktop
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
env:
VERSION: "0.4.5.${{github.run_number}}"
jobs:
build:
runs-on: windows-latest
steps:
- name: Setup .NET SDK
uses: actions/[email protected]
with:
dotnet-version: '9.0.x'
- name: Checkout
uses: actions/checkout@v3
- name: Install dependencies
run: dotnet restore src/Weather.sln
# Build applications
- name: Build win-x64
run: dotnet publish src\WeatherCalendar\WeatherCalendar.csproj -r win-x64 -p:Configuration=Release -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true --self-contained true -property:Version=${{ env.VERSION }}
- name: Zip win-x64 build
uses: vimtor/action-zip@v1
with:
files: src\WeatherCalendar\bin\Release\net8.0-windows\win-x64\publish\
dest: WeatherCalendar-Windows-x64.zip
- name: Collect win-x64 artifacts
uses: actions/upload-artifact@v4
with:
name: WeatherCalendar-Windows-x64
path: ${{ github.workspace }}\WeatherCalendar-Windows-x64.zip
# Release Management
- name: Delete release drafts
uses: hugo19941994/[email protected]
with:
threshold: 1s
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create Release
uses: softprops/action-gh-release@v1
#if: startsWith(github.ref, 'refs/tags/')
with:
draft: true
tag_name: v${{ env.VERSION }}
generate_release_notes: true
files: |
${{ github.workspace }}\WeatherCalendar-Windows-x64.zip