Add workflows

This commit is contained in:
BlossomiShymae
2024-08-09 06:41:12 -05:00
parent 3135425e72
commit ee8976c293
2 changed files with 37 additions and 1 deletions

35
.github/workflows/release.yml vendored Normal file
View File

@@ -0,0 +1,35 @@
# .github/workflows/release.yml
on: push
jobs:
build:
runs-on: windows-latest # For a list of available runner types, refer to
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on
steps:
- name: Install .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: release
- name: Build
run: dotnet build Needlework.Net.Desktop -c Release
- name: Publish
run: dotnet publish Needlework.Net.Desktop -c Release -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true -p:DebugType=None -p:DebugSymbols=false -o publish -r win-x64 --self-contained=false
- name: Version
shell: powershell
run: $xml = [xml](Get-Content .\Needlework.Net.Desktop\Needlework.Net.Desktop.csproj); echo ($xml.Project.PropertyGroup).AssemblyVersion >> $env.VERSION;
- name: Zip
run: 7z a -tzip NeedleworkDotNet-win-x64.zip ./Publish/* README.md LICENSE
- name: Release
uses: softprops/action-gh-release@v1
with:
name: "Needlework.Net v${{env.VERSION}}"
prerelease: true
tag_name: "${{env.VERSION}}"
files: |
Publish/NeedleworkDotNet-win-x64.zip

View File

@@ -9,7 +9,8 @@
</PropertyGroup> </PropertyGroup>
<PropertyGroup Label="Avalonia"> <PropertyGroup Label="Avalonia">
<AvaloniaXamlIlDebuggerLaunch>False</AvaloniaXamlIlDebuggerLaunch> <AvaloniaXamlIlDebuggerLaunch>False</AvaloniaXamlIlDebuggerLaunch>
<ApplicationIcon>app.ico</ApplicationIcon> <ApplicationIcon>app.ico</ApplicationIcon>
<AssemblyName>NeedleworkDotNet</AssemblyName>
<AssemblyVersion>0.1.0.0</AssemblyVersion> <AssemblyVersion>0.1.0.0</AssemblyVersion>
<FileVersion>0.1.0.0</FileVersion> <FileVersion>0.1.0.0</FileVersion>
<AvaloniaXamlVerboseExceptions>False</AvaloniaXamlVerboseExceptions> <AvaloniaXamlVerboseExceptions>False</AvaloniaXamlVerboseExceptions>