-
Notifications
You must be signed in to change notification settings - Fork 5
55 lines (47 loc) · 1.83 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
name: GitHub Release
on:
push:
branches: [ ci, avalonia ]
tags:
- 'v*.*'
jobs:
create_release:
name: Create GitHub Release
runs-on: windows-2022
steps:
- name: Install 7Zip PowerShell Module
shell: powershell
run: Install-Module 7Zip4PowerShell -Force -Verbose
- name: Checkout repository
uses: actions/checkout@v4
with:
lfs: 'true'
- name: Get the project's version
uses: kzrnm/[email protected]
id: get-version
with:
proj-path: KHFM-VF-Patch/KHFM-VF-Patch.csproj
- name: Build for Windows (x86)
shell: cmd
run: dotnet publish KHFM-VF-Patch/KHFM-VF-Patch.sln /p:PublishReadyToRun=true --self-contained --runtime win-x86
- name: Build for Linux (x64)
shell: cmd
run: dotnet publish KHFM-VF-Patch/KHFM-VF-Patch.sln /p:PublishReadyToRun=true --self-contained --runtime linux-x64
- name: Create Artifacts
shell: cmd
run: call .\CI\CreateArtifact.cmd
- name: Rename Windows Artifact with project version
shell: cmd
run: mv ./KHFM-VF-Patch/KHFM-VF-Patch-Windows.zip ./KHFM-VF-Patch/KHFM-VF-Patch-Windows-${{ steps.get-version.outputs.version }}.zip
- name: Rename Linux Artifact with project version
shell: cmd
run: mv ./KHFM-VF-Patch/KHFM-VF-Patch-Linux.zip ./KHFM-VF-Patch/KHFM-VF-Patch-Linux-${{ steps.get-version.outputs.version }}.zip
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v2
with:
files: |
./KHFM-VF-Patch/KHFM-VF-Patch-Windows-${{ steps.get-version.outputs.version }}.zip
./KHFM-VF-Patch/KHFM-VF-Patch-Linux-${{ steps.get-version.outputs.version }}.zip
draft: true
prerelease: true