-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (55 loc) · 1.7 KB
/
Copy pathrelease.yml
File metadata and controls
66 lines (55 loc) · 1.7 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
name: Release Build
on:
push:
tags:
- 'v*'
workflow_dispatch:
inputs:
version:
description: 'Release version (e.g., 1.1.1)'
required: true
default: '1.1.1'
jobs:
build-release:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v2
- name: Restore NuGet packages
run: nuget restore ManpLab.sln
- name: Build solution
run: msbuild ManpLab.sln /p:Configuration=Release /p:Platform=x64 /v:minimal
- name: Run release build script
shell: pwsh
run: |
$version = "${{ github.event.inputs.version }}"
if ([string]::IsNullOrEmpty($version)) {
$version = "${{ github.ref_name }}".TrimStart('v')
}
.\Build-Release.ps1 -Configuration Release -Platform x64 -Version $version -SkipBuild
- name: Upload MSIX Package
uses: actions/upload-artifact@v4
with:
name: ManpLab-MSIX-${{ github.ref_name }}
path: Release-Output/MSIX/**/*.msix
- name: Upload Portable ZIP
uses: actions/upload-artifact@v4
with:
name: ManpLab-Portable-${{ github.ref_name }}
path: Release-Output/Portable-ZIP/**/*.zip
- name: Create Release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
with:
files: |
Release-Output/MSIX/**/*.msix
Release-Output/Portable-ZIP/**/*.zip
Release-Output/MSIX/INSTALLATION_GUIDE.txt
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}