-
Notifications
You must be signed in to change notification settings - Fork 104
47 lines (45 loc) · 2.27 KB
/
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
41
42
43
44
45
46
47
name: Create release
on:
workflow_dispatch:
inputs:
version:
description: "Version for the release"
required: true
type: string
jobs:
create-release:
runs-on: windows-2022
env:
Configuration: Release
Solution_Name: Source\EpubReader.sln
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v2
- name: Restore dependencies
run: msbuild $env:Solution_Name /t:Restore /p:Configuration=$env:Configuration /p:RestorePackagesConfig=true
- name: Build solution
run: msbuild $env:Solution_Name /p:Configuration=$env:Configuration
- name: Package release files
run: |
7z a VersOne.Epub.Net46.zip .\Source\VersOne.Epub\bin\Release\net46\VersOne.Epub.dll
7z a VersOne.Epub.NetStandard.zip .\Source\VersOne.Epub\bin\Release\netstandard1.3\VersOne.Epub.dll
7z a ConsoleDemo.zip .\Source\VersOne.Epub.ConsoleDemo\bin\Release\net7.0\HtmlAgilityPack.dll .\Source\VersOne.Epub.ConsoleDemo\bin\Release\net7.0\VersOne.Epub.dll .\Source\VersOne.Epub.ConsoleDemo\bin\Release\net7.0\VersOne.Epub.ConsoleDemo.dll .\Source\VersOne.Epub.ConsoleDemo\bin\Release\net7.0\VersOne.Epub.ConsoleDemo.exe .\Source\VersOne.Epub.ConsoleDemo\bin\Release\net7.0\VersOne.Epub.ConsoleDemo.deps.json .\Source\VersOne.Epub.ConsoleDemo\bin\Release\net7.0\VersOne.Epub.ConsoleDemo.runtimeconfig.json
7z a WpfDemo.zip .\Source\VersOne.Epub.WpfDemo\bin\Release\HtmlRenderer.dll .\Source\VersOne.Epub.WpfDemo\bin\Release\HtmlRenderer.WPF.dll .\Source\VersOne.Epub.WpfDemo\bin\Release\System.IO.Compression.dll .\Source\VersOne.Epub.WpfDemo\bin\Release\VersOne.Epub.dll .\Source\VersOne.Epub.WpfDemo\bin\Release\VersOne.Epub.WpfDemo.exe
- name: Create release
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ github.event.inputs.version }}
draft: true
files: |
VersOne.Epub.Net46.zip
VersOne.Epub.NetStandard.zip
ConsoleDemo.zip
WpfDemo.zip