Create release #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: 7 | |
- 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 |